declare @Location nvarchar(100), @startdate date ,@enddat...


Please login or register to vote for this query.

(click on this box to dismiss)

Software Quality Assurance and Testing Meta

Q&A about the site for software quality control experts, automation engineers, and software testers

declare @Location nvarchar(100), @startdate date ,@enddate date
set @Location =N'reading, united kingdom'
set @startdate='9/1/11'
set @enddate='10/1/11'

select top 1000 u.reputation, u.displayname, u.aboutme,
sum(p.score) as postscores,
sum(c.score) as commenttscore
  from dbo.users u 
left join dbo.posts p on =p.owneruserid and p.creationdate between @startdate  and @enddate
left join comments c on =c.userid and c.creationdate between @startdate  and @enddate
where u.location=@location
group by u.reputation,  u.displayname, u.aboutme
order by sum(p.score) desc

Enter Parameters

Switch to main site
loading Hold tight while we fetch your results