Q&A about the site for Joomla! administrators, users, developers and designers
WITH TopUsers AS ( SELECT TOP 1000 Id, Reputation FROM Users ORDER BY Reputation DESC ) SELECT Posts.OwnerUserId, [User Link] = Posts.OwnerUserId, COUNT(*) As Number FROM Posts LEFT JOIN TopUsers on Posts.OwnerUserId = TopUsers.Id WHERE Posts.Score < 2 GROUP BY Posts.OwnerUserId ORDER BY Number DESC, Posts.OwnerUserId DESC