old question views

0

Please login or register to vote for this query.

(click on this box to dismiss)

for questions more than a year and a half old, how many views do they have?

Stack Overflow

Q&A for programmers

-- old question views
-- for questions more than a year and a half old, how many views do they have?

select '<= 100 views', count(*) from Posts
where PostTypeId = 1 
and ViewCount <= 100
and CreationDate <= GETUTCDATE() - 365 * 1.5
union all 
select '>= 1000 views', count(*) from Posts
where PostTypeId = 1 
and ViewCount >= 1000
and CreationDate <= GETUTCDATE() - 365 * 1.5
union all 
select '>= 2500 views', count(*) from Posts
where PostTypeId = 1 
and ViewCount >= 2500
and CreationDate <= GETUTCDATE() - 365 * 1.5
union all
select '>= 10000 views', count(*) from Posts
where PostTypeId = 1 
and ViewCount >= 10000
and CreationDate <= GETUTCDATE() - 365 * 1.5
union all
select 'all questions', count(*) from Posts
where PostTypeId = 1 
and CreationDate <= GETUTCDATE() - 365 * 1.5

Enter Parameters

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