Post with image from low rep users compared with post without images

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow en español

Preguntas y respuestas para programadores y profesionales de la informática

select a.date, withimages, withoutimages, withimages*100/withoutimages [Percent by day]
from
(
select CONVERT(date, p.CreationDate) [date], Count(*) WithImages
from posts p inner join users u on u.id = p.owneruserid
where
    p.body like '%imgur.com%' 
    and p.posttypeid = 1 
    and p.CreationDate > '2019-01-01 00:00:00'
    and u.reputation < 100
Group by CONVERT(date, p.CreationDate)
) a inner join 
(
select CONVERT(date, p.CreationDate) [date], Count(*) WithoutImages
from posts p inner join users u on u.id = p.owneruserid
where
    p.body not like '%imgur.com%' 
    and p.posttypeid = 1 
    and p.CreationDate > '2019-01-01 00:00:00'
    and u.reputation < 100
Group by CONVERT(date, p.CreationDate)
) b on a.date = b.date
order by a.date asc

Enter Parameters

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