Accuracy : people who you should take seriously

0

Please login or register to vote for this query.

(click on this box to dismiss)

This query shows the ratio between the number of posts and the number of accepted posts AKA accuracy

Physical Fitness

Q&A for physical fitness professionals, athletes, trainers, and those providing health-related needs

-- Accuracy : people who you should take seriously
-- This query shows the ratio between the number of posts and the number of accepted posts AKA accuracy

SELECT TOP 100 posts.NumberOfPost, answers.NumberOfAccepted, answers.NumberOfAccepted / (CAST (posts.NumberOfPost AS FLOAT) /100) AS accuracy, u.id as [User Link]
FROM Users u CROSS APPLY 
(
 SELECT count(p.OwnerUserId) AS NumberOfPost
 FROM Posts p
 WHERE u.id = p.OwnerUserId AND
 p.tags LIKE ##tag:string##
 GROUP BY p.OwnerUserId ) AS posts CROSS APPLY
(
 SELECT count(answers.OwnerUserId) AS NumberOfAccepted
 FROM Posts posts, Posts answers
 WHERE u.id = answers.OwnerUserId AND
 posts.id = answers.ParentId AND
 posts.AcceptedAnswerId = answers.id AND
 posts.tags LIKE ##tag:string##
 GROUP BY answers.OwnerUserId ) AS answers

WHERE NumberOfAccepted > 1 AND NumberOfPost > 50
ORDER BY accuracy DESC

Enter Parameters

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