Top 10 users from Kerala

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A for physical fitness professionals, athletes, trainers, and those providing health-related needs

SELECT top 10 ROW_NUMBER() OVER(ORDER BY us.Reputation DESC) AS [#], us.id [User Link],
DATEDIFF(M,us.CreationDate,getdate())-1 as [Member for(Months)],
us.Reputation as [Total Reputation], Count(p.OwnerUserId) as [answers],
us.Reputation/(DATEDIFF(M,us.CreationDate,getdate())-1) as [avg. Month rep],
us.Location       
FROM Users us
JOIN Posts p on us.Id = p.OwnerUserId AND p.PostTypeId = 2
WHERE lower(us.Location) like '%kerala%'
GROUP BY us.Id, us.DisplayName,us.Reputation,us.CreationDate,us.Location 
ORDER BY us.Reputation DESC;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results