Famous Question Report

0

Please login or register to vote for this query.

(click on this box to dismiss)

Who is asking to much good question and never answer ?

Code Review

Q&A for peer programmer code reviews

-- Famous Question Report
-- Who is asking to much good question and never answer ?

select count(distinct p.id) as FamousQuestion, 
       u.id [User Link], 
       u.reputation AS Reputation,
       (100 * sum(case when p2.posttypeid = 1 then 1 else 0 end))/ count(1) as PercentQuestions,
       (100 * sum(case when p2.posttypeid = 2 then 1 else 0 end))/ count(1) as PercentAnswers
from posts p
    inner join users u
        on p.owneruserid = u.id
    inner join posts p2
        on p2.owneruserid = u.id
where p.viewcount >= 10000
and p.posttypeid = 1
group by u.id, u.reputation
order by count(distinct p.id) desc

Enter Parameters

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