SELECT u.Id, u.DisplayName, COUNT(b.Id) AS BadgeCount FRO...

0

Please login or register to vote for this query.

(click on this box to dismiss)

English Language and Usage Meta

Q&A about the site for linguists, etymologists, and serious English language enthusiasts

SELECT u.Id, u.DisplayName, COUNT(b.Id) AS BadgeCount
FROM Users u
JOIN Badges b ON u.Id = b.UserId
JOIN Posts p ON u.Id = p.OwnerUserId
WHERE u.Location = 'Latvia'
  AND p.CreationDate BETWEEN '2021-01-01' AND '2021-12-31'
GROUP BY u.Id, u.DisplayName
HAVING COUNT(b.Id) > 100
ORDER BY BadgeCount DESC;

Enter Parameters

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