select owneruserid as [User Link] , count(*) , case when ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select owneruserid as [User Link]
     , count(*)
     , case 
       when posttypeid = 1 then 'Q'
       when posttypeid = 2 then 'A'
       end posttype
from posts
where posttypeid in (1,2)
and owneruserid is not null
group by owneruserid, posttypeid
having count(*) > 1000
order by count(*) desc

Enter Parameters

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