Questions answered by more than 3 50k users

0

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla

Q&A for Joomla! administrators, users, developers and designers

WITH 
  ranked_users(user_id, rep, rnk) AS
  (
    SELECT "id", reputation, DENSE_RANK() OVER (ORDER BY reputation DESC)
    FROM users
  )
SELECT 
  q.Id AS [Post Link],
  q.AnswerCount AS total_answers,
  COUNT(*) AS top_user_answers
FROM Posts AS Q
  INNER JOIN Posts AS A ON 
    A.ParentId = Q.Id
  INNER JOIN ranked_users AS u ON 
    u.user_id = a.OwnerUserID
WHERE
  u.rnk <= ##TopN##
GROUP BY q."id", q.AnswerCount
HAVING COUNT(*) >= 3;

Enter Parameters

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