Users with a single post and a great question (great answer) badge

1

Please login or register to vote for this query.

(click on this box to dismiss)

Biblical Hermeneutics Meta

Q&A about the site for professors, theologians, and those interested in exegetical analysis of biblical texts

with postscounts_cte AS
(
SELECT 
  u.Id AS uid,
  COUNT(p.Id) as cnt
FROM Users u INNER JOIN Posts p ON p.OwnerUserId=u.Id
WHERE (p.PostTypeId IN (##types?1,2##)) 
GROUP BY u.Id
)
---1=questions
---2=answers
---1,2=both questions and answers


SELECT TOP(##num?100##)
   uid AS [User Link],
   'site://users/' + CAST(uid AS varchar)+'/badges' AS [Link]
FROM Badges b INNER JOIN postscounts_cte u ON b.UserId=u.uid
  WHERE (b.Name = '##name?Great Answer##') AND (u.cnt=1)
ORDER BY b.Date

Enter Parameters

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