consecutive number query demo

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

select h.number hour ,count(*) as count
from master..spt_values h 
left join comments c on h.number = datepart(hour, c.creationdate)
where 1=1
  and type = 'P' and number < 24
  and c.userid = '9131476'  
group by h.number
;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results