Select Day, Count From (Select DATENAME(dw, v.CreationDat...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

Select Day, Count
From (Select DATENAME(dw, v.CreationDate) as Day, Count(*) as Count
     From Posts p
      Inner Join Votes v ON v.PostId = p.Id
      Where v.VoteTypeId = 1
     Group By DATENAME(dw, v.CreationDate)
) As T
Order By Day Desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached