SELECT Users.Id, Users.Reputation FROM Users JOIN Posts O...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Board and Card Games Meta

Q&A about the site for people who like playing board games, designing board games or modifying the rules of existing board games

-- Query for retrieving user IDs and reputations of users 
--who have posted no questions but more than 10 answers
SELECT Users.Id, Users.Reputation
FROM Users
JOIN Posts ON Users.Id = Posts.OwnerUserId
WHERE Posts.PostTypeId = 2
GROUP BY Users.Id, Users.Reputation
HAVING COUNT(CASE WHEN Posts.PostTypeId = 1 THEN 1 END) = 0 AND 
       COUNT(CASE WHEN Posts.PostTypeId = 2 THEN 1 END) > 10
ORDER BY Users.Reputation DESC;

Enter Parameters

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