Users with many questions, but few answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

MathOverflow

Q&A for professional mathematicians

set nocount on 

declare @PostStats table (OwnerUserId int,  questions int, answers int) 

insert @PostStats
select
    OwnerUserId, 
    questions = sum(case when PostTypeId = 1 then 1 else 0 end), 
    answers = sum(case when PostTypeId = 2 then 1 else 0 end)
from Posts
where PostTypeId in (1,2)
group by OwnerUserId

set nocount off

select top 100 u.id as [User Link] , [Reputation] , questions, answers from @PostStats
join Users u on OwnerUserId = u.Id
where questions > (answers * 2.0) and u.Reputation >= 1000 
order by answers asc

Enter Parameters

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