select datepart(dw, creationdate) [day of week] , count(*...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

select datepart(dw, creationdate) [day of week]
     , count(*) [total posts]
     , sum(case posttypeid when 1 then 1 else 0 end) [questions]
     , sum(case posttypeid when 2 then 1 else 0 end) [answers]
from posts
where owneruserid = ##uid?28111##
group by datepart(dw, creationdate)
order by datepart(dw, creationdate)

Enter Parameters

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