Monthly count of posts with inline http images not from imgur

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

select
  DateAdd(Month, DateDiff(Month, 0, CreationDate), 0) as [Month],
  Count(*) as [Posts]
from Posts
where Body like '%<img src="http://%'
  and Replace(Replace(Replace(Body, '<img src="http://i.stack.imgur.com/', 'X'), '<img src="http://i.imgur.com/', 'X'), '<img src="http://imgur.com/', 'X') like '%<img src="http://%'
  and CreationDate between ##StartDate:string?2015-01-01## and ##EndDate:string?2016-01-01##
group by DateAdd(Month, DateDiff(Month, 0, CreationDate), 0)
order by [Month]

Enter Parameters

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