Voting ratio, last 90 days

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 count(case when VoteTypeId=2 then 1 else null end) Upvotes,
 count(case when VoteTypeId=3 then 1 else null end) Downvotes,
 count(case when VoteTypeId=3 then 1 else null end)*1.0/count(case when VoteTypeId=2 then 1 else null end) "DV / UV ratio"
 
from Votes
where CreationDate > getdate()-90

Enter Parameters

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