This attempts to identify important questions in the last N days, by votes, comments and answers
Q&A for anime and manga fans
-- Recent Active Questions -- This attempts to identify important questions in the last N days, by votes, comments and answers select count(v.postid) as 'Vote count', p.ViewCount AS 'Views', v.postid AS [Post Link], p.AnswerCount as 'Answers', p.CreationDate from votes v inner join posts p on p.id=v.postid inner join comments c on p.id=c.postid where PostTypeId = 1 and VoteTypeId=2 and {fn NOW()} - p.CreationDate < ##Days## group by v.postid,p.body,p.CreationDate,p.ViewCount, c.postid, p.AnswerCount order by cast(p.ViewCount as INT) * cast(p.AnswerCount as INT) * ( cast(count(c.postid) as INT) + cast(count(v.postid) as INT)) desc