Q&A for Ubuntu users and developers
select top 10 U.Id as UserId, U.DisplayName as DisplayName, U.Reputation as Reputation, Sum( case when P.PostTypeId = 1 then 1 else 0 end ) as Questions, Sum( case when P.PostTypeId = 2 then 1 else 0 end ) as Answers from Users as U inner join Posts as P on P.OwnerUserId = U.Id and P.PostTypeId in ( 1, 2 ) -- A reputation of at least 25000. where U.Reputation >= 25000 and U.LastAccessDate >= '2015-01-01' group by U.Id, U.DisplayName, U.Reputation having -- Asked at least 200 questions and ... Sum( case when P.PostTypeId = 1 then 1 else 0 end ) >= 200 and -- ... contributed no more than 5 answers. Sum( case when P.PostTypeId = 2 then 1 else 0 end ) <= 5 order by U.Reputation desc