Q&A for professional and enthusiast programmers
SELECT TOP 50 u.Id, u.DisplayName, u.Reputation, count(*) as [Total Number of Posts], count(*)/u.Reputation as Ratio FROM Users u join Posts p on p.OwnerUserId = u.Id where p.postTypeId in (1,2) group by u.Id,u.DisplayName,u.Reputation ORDER BY Ratio DESC