Maximum score per day per post type

0

Please login or register to vote for this query.

(click on this box to dismiss)

Startups Meta

Q&A for entrepreneurs faced with delivering a new product or service under conditions of significant uncertainty

SELECT CASE WHEN PostTypeId = 1 THEN 'Questions' ELSE 'Answers' END,
   MAX(CAST(Score AS FLOAT) / DATEDIFF(DAY, CreationDate, GETDATE())) AS Score
   FROM Posts
   WHERE DATEDIFF(DAY, CreationDate, GETDATE()) > 0
     AND PostTypeId IN (1, 2)
   GROUP BY PostTypeId

Enter Parameters

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