Is it possible to check the hottest questions of this year ? This century ?
I tried to input : https://stackoverflow.com/?tab=year
but that didn't work.
Is it possible to check the hottest questions of this year ? This century ?
I tried to input : https://stackoverflow.com/?tab=year
but that didn't work.
Based on this answer of mine on MSE I assume I can simply add an extra where clause to take a certain period into account:
/*
(log(Qviews)*4) + ((Qanswers * Qscore)/5) + sum(Ascores)
--------------------------------------------------------
((QageInHours+1) - ((QageInHours - Qupdated)/2)) ^ 1.5
*/
select top 1000
(
(log(qviews)*4) + ((qanswers * qscore)/5) + sumascores
)/(
power( (qageinhours+1) - ((qageinhours - qupdated)/2), 1.5)
) as hotness
, id as [Post Link]
from (
select viewcount as qviews
, answercount as qanswers
, score as qscore
, ISNULL((select sum(score)
from posts
where parentid = q.id
and creationdate > ##startdate:string## ),0) as sumascores
, datediff(hh, creationdate, getdate()) as qageinhours
, datediff(hh, lastactivitydate, getdate()) as qupdated
, id
from posts q
where q.posttypeid = 1 -- Q
and creationdate > ##startdate:string##
) rawdata
where qviews>0
order by 1 desc -- yeah I know order by ordinal is bad