Score history graph of a post

1

Please login or register to vote for this query.

(click on this box to dismiss)

The vote timestamps are estimated by level distributing their time in the day (they are estimated to 12:00:00 if it was a single vote on that day).

Japanese Language

Q&A for students, teachers, and linguists wanting to discuss the finer points of the Japanese language

WITH Raw AS (
  SELECT
    CreationDate,
    RANK() OVER (PARTITION BY CreationDate ORDER BY Id) AS DayNo,
    COUNT(*) OVER (PARTITION BY CreationDate) AS DayCount,
    VoteTypeId
  FROM Votes
  WHERE
    VoteTypeId BETWEEN 2 AND 3
    AND
    PostId = ##PostId:int##
)
SELECT
  DATEADD(s, 86400.0 / (DayCount + 1) * DayNo, CreationDate) AS EstCrDate,
  SUM(5 - 2 * VoteTypeId) OVER (
    ORDER BY CreationDate, DayNo ROWS UNBOUNDED PRECEDING
  ) AS Score
FROM Raw

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results