Q&A for those interested in the geology, meteorology, oceanography, and environmental sciences
SELECT Top 3 tgs.TagName as Tag ,COUNT(psttg.TagId) as NoOfTags ,COUNT(DISTINCT usr.Id) as NoOfUsers ,COUNT(DISTINCT pst.Id) as NoOfPosts FROM Users usr Inner Join Posts pst ON pst.OwnerUserID = usr.Id Inner Join PostTags psttg ON psttg.PostId = pst.Id Inner Join Tags tgs ON tgs.Id = psttg.TagId WHERE 1=1 and UPPER(usr.DisplayName) like 'ANDR%' and pst.CreationDate >= CAST('2019-01-01' AS DATE) and pst.CreationDate < CAST('2020-01-01' AS DATE) GROUP BY tgs.TagName HAVING COUNT(DISTINCT usr.Id) < 500 and COUNT(DISTINCT pst.Id) > 500 ORDER BY NoOfTags DESC ;