How many percent of all questions are ID?

0

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, @endDate datetime;
declare @num_all int, @num_id float;

select @endDate = DATEADD(month,-4,GETDATE())
select @startDate = '2011-11-30 19:00:00'

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

select @num_id = count(*) from Posts
where PostTypeId = 1
and tags like '%identify%'
and CreationDate between @startDate and @endDate

select @num_id/@num_all

Enter Parameters

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