Questions per day


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

declare @startDate datetime;
declare @endDate datetime;
declare @days float;

select @endDate = DATEADD(day,-14,GETDATE())
select @startDate = '2011-11-30 19:00:00' /*DATEADD(hour,-336,@endDate)*/
select @days = DATEDIFF(DAY, @startDate, @endDate)

select count(*)/@days from Posts
where PostTypeId = 1
and CreationDate between @startDate and @endDate

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results