CV Users with most interesting answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Statistical Analysis

Q&A for statisticians, data analysts, data miners and data visualization experts

-- top answers on CV
SELECT MAX(score) [Max Score], count(p.id) [Good Answers], 
       (select count(*) from posts p2 
       where p2.posttypeid=2 and p2.owneruserid = u.id) [Total Answers],
       u.Reputation, 
       --u.displayname,
      'site://users/' + CAST(u.Id AS nvarchar)
                      + '?tab=answers&sort=votes|' 
                      + u.displayname  cv_user,
       u.Age, u.Location, u.WebsiteURL,
       LastAccessDate
FROM users u, posts p
WHERE u.id = p.owneruserid
AND p.posttypeid = 2  -- answers only
AND p.score >= ##scoreThreshhold?25##
AND p.parentid NOT IN 
(1337 -- jokes
,726  -- quotes
,423  -- cartoons
,5115 -- statisticians
)
GROUP BY reputation, u.displayname,
       u.age, u.location, u.websiteurl, u.lastaccessdate, u.id
ORDER BY count(p.id) desc, max(score) desc

Enter Parameters

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