Question 1

0

Please login or register to vote for this query.

(click on this box to dismiss)

Signal Processing Meta

Q&A about the site for practitioners of the art and science of signal, image and video processing

/*
SELECT ID, CommentCount, FavoriteCount
FROM Posts
WHERE CommentCount > FavoriteCount



SELECT TOP 2 u.ID, u.DisplayName, sum(v.BountyAmount)
FROM users u
JOIN posts p
  on u.id = p.OwnerUserID
JOIN votes v
  on p.ID = v.PostID
GROUP BY u.ID, u.DisplayName
ORDER BY sum(v.BountyAmount) desc


SELECT u.ID, u.DisplayName, SUM(p.AnswerCount) Total_AnswerCount
FROM users u
JOIN posts p
  on u.id = p.OwnerUserID
GROUP BY u.ID, u.DisplayName
HAVING SUM(p.AnswerCount) > 2500
*/

WITH month_CTE ([Month], ID, DisplayName, Total_ViewCount)
AS 
(
SELECT month(p.CreationDate), u.ID, u.DisplayName, sum(ViewCount)
    FROM users u
    JOIN posts p
      on u.id = p.OwnerUserID
    GROUP BY month(p.CreationDate), u.ID, u.DisplayName
)

SELECT [Month], DisplayName
, ROW_NUMBER() OVER(partition by [Month] ORDER BY Total_ViewCount desc)
FROM month_CTE
order by [Month]

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results