Publicity badges awarded within a given period

1

Please login or register to vote for this query.

(click on this box to dismiss)

MathOverflow

Q&A for professional mathematicians

SELECT TOP(##num?200##)
  UserId AS [User Link],
  sum(case when name = 'Publicist' then 1 else 0 end) AS Publicist,
  sum(case when name = 'Booster' then 1 else 0 end) AS Booster,
  sum(case when name = 'Announcer' then 1 else 0 end) AS Announcer,
  sum(case when (name = 'Announcer') or (name = 'Booster') or (name = 'Publicist') then 1 else 0 end) AS total
FROM Badges
WHERE   Date >= '##Date1?2019-12-12##' AND Date <= '##Date2?2019-12-14##'
GROUP BY UserId
ORDER BY Publicist DESC, Booster DESC, Announcer DESC, total DESC

Enter Parameters

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