WITH t1 AS( SELECT * FROM Posts WHERE OwnerUserId IS NOT ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

WITH t1 AS(
  SELECT *
  FROM Posts
  WHERE OwnerUserId IS NOT NULL
  )  
SELECT u.Id, COUNT(u.Id)
FROM Users u
LEFT JOIN t1
    ON u.Id = t1.OwnerUserId
GROUP BY u.Id
ORDER BY COUNT(u.Id) DESC;

Enter Parameters

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