Displays the 100 chattiest of our peers...
Q&A for professional and enthusiast programmers
-- Who does the most typing on Stack Overflow?
-- Displays the 100 chattiest of our peers...
select top 100 u.Id as [User Link],
(select sum(len(Body)) from posts where owneruserid = u.id) posts,
(select sum(len(Text)) from comments where userid = u.id) comments
--posts + comments total
from users u
order by posts desc
--select top 100 u.Id as [User Link],
--sum(len(p.Body)) as AnswerKeystrokes,
--from users u
-- inner join posts p on u.id=p.owneruserid
-- inner join comments c on u.id = c.userid
--group by u.id
--order by AnswerKeystrokes desc