users and their accepted question rate


Please login or register to vote for this query.

(click on this box to dismiss)

rep greater than 1,000? yes -- "established user - You've been around for a while"

Unix and Linux

Q&A for users of Linux, FreeBSD and other Un*x-like operating systems

-- SELECT TOP 100 
--   [Users].Id as [User Link], 
--   [Users].Reputation, 
--  DATEDIFF(year, [Users].CreationDate, GETDATE()) "UserAge"
-- FROM Users
-- WHERE [Users].Reputation > 1000
-- -- temporary sort; really sort by percent
-- ORDER BY [Users].Reputation DESC

SELECT COUNT(acceptedq.Id), COUNT(unacceptedq.Id)
FROM Posts acceptedq, Posts unacceptedq
-- 1 = Question
acceptedq.PostTypeId = 1
-- Q has an accepted Answer
AND acceptedq.AcceptedANswerId IS NOT NULL
-- Q is not closed
AND acceptedq.ClosedDate IS NULL
AND acceptedq.OwnerUserId = 674


unacceptedq.PostTypeId = 1
AND unacceptedq.AcceptedANswerId IS NULL
-- Q is not closed
AND unacceptedq.ClosedDate IS NULL
AND unacceptedq.OwnerUserId = 674
GROUP BY acceptedq.OwnerUserId

Enter Parameters

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