Question asking badges

0

Please login or register to vote for this query.

(click on this box to dismiss)

Role-playing Games

Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games

with user_questions as (
  select count(*) number_asked
  from Posts
  where score > 0
        and PostTypeId = 1
        and OwnerUserId is not null
  group by OwnerUserId
)

select count(*),
       case 
         when number_asked > 50 then 'gold'
         when number_asked > 10 then 'silver'
         when number_asked > 1  then 'bronze'
       end badge_type
from user_questions
group by case 
         when number_asked > 50 then 'gold'
         when number_asked > 10 then 'silver'
         when number_asked > 1  then 'bronze'
       end

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results