Q&A for those who study, teach, research and apply economics and econometrics
; with qacounts_cte AS (SELECT OwnerUserId AS uid, OwnerDisplayName AS udn, COUNT(Id) AS Pcount, SUM(case when PostTypeId = 1 then 1 else 0 end) AS QCount, SUM(case when PostTypeId = 2 then 1 else 0 end) AS ACount FROM Posts GROUP BY OwnerUserId, OwnerDisplayName ) SELECT TOP(##num?500##) uid AS [User Link], udn AS [Display Name], QCount FROM qacounts_cte WHERE ACount=0 ORDER BY QCount DESC