Q&A for teachers and students of the Esperanto language
SELECT top(3) t.TagName, count(distinct(p.id)) as skaits, count(distinct u.id) as unique_users FROM Posts as p INNER JOIN PostTags as pt on pt.PostId = p.id INNER JOIN tags as t ON t.id = pt.tagId INNER JOIN Users as u ON u.id = p.OwnerUserId WHERE Year(p.CreationDate)=2019 and UPPER(u.DisplayName) like 'ANDR%' Group by t.TagName having count(distinct(p.OwnerUserId))<500 and count(distinct(p.Id))>500 Order by skaits desc