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

Anime and Manga Meta

Q&A about the site for anime and manga fans

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 main site
loading Hold tight while we fetch your results