Find top User for a Country for a specific Month/Year

0

Please login or register to vote for this query.

(click on this box to dismiss)

http://meta.stackexchange.com/questions/267968/find-top-user-for-a-country-for-a-specific-month-year

Webmasters

Q&A for pro webmasters

declare @country nvarchar(100)
set @country = ##country:string?England##
set @country = '%'+ @country +'%'

select owneruserid as [User Link]
from (
select p.owneruserid
     from posts p 
inner join votes v on v.postid = p.id
inner join users u on u.id = p.owneruserid
where v.creationdate between ##start:string?2015-05-01## 
                         and ##end:string?2015-05-07##
group by p.owneruserid 
) as rawdata

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results