select year(CreationDate)year, month(CreationDate)month, ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Popular badges. Pets Exchange has an elaborate badging system. Use the badges table to find the most common type of badges. Specifically, show badge name (label name) and the number of people who won it (label cnt), limiting results to badges with at least 20 winners and sort the results by cnt in a descending order.

Academia Meta

Q&A about the site for academics and those enrolled in higher education

select year(CreationDate)year,
       month(CreationDate)month,
       posttypeid,
       count(distinct id)cnt
from posts
group by year(CreationDate), month(CreationDate), posttypeid
order by posttypeid asc, cnt desc;

Enter Parameters

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