select cast(p.CreationDate as Date) Date, sum(case when u...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

select 
cast(p.CreationDate as Date) Date,
sum(case when u.Reputation > 20 then 1 else 0 end)
/ (count(*) + 0.0) [Ratio]
from Posts p
join Users u on u.Id = p.OwnerUserId
where PostTypeId = 1
group by cast(p.CreationDate as Date)
order by cast(p.CreationDate as Date) asc

Enter Parameters

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