The top 20 questions with the most down-votes (ignores up-votes)
Q&A for professional and enthusiast programmers
SELECT creationdate, COUNT(id) AS count FROM posts where YEAR(creationdate) = YEAR(GETDATE()) GROUP BY creationdate; /* select p.id, SUM (p.score) OVER (ORDER BY tagName) AS RunningTotal from posts p; SELECT Id, tagName, t.count, SUM (t.count) OVER (ORDER BY tagName) AS RunningTotal FROM tags t; select top 5 pt.tagid from posts p inner join posttags pt on pt.postid=p.id where YEAR(p.creationdate) = YEAR(GETDATE()) group by pt.tagid order by count(*) desc; */ /* where select tagid, count(postid) from posttags group by tagid order by count(postid) desc; */