Votes per views ratio

0

Please login or register to vote for this query.

(click on this box to dismiss)

History of Science and Math

Q&A for people interested in the history and origins of science and mathematics

select count(v.postid) as 'Vote count', 
              v.postid AS [Post Link], 
              p.ViewCount as "Views",
              p.creationdate as "Date",
              CONVERT(decimal,count(v.postid)/p.ViewCount) as [Ratio]
from votes v 
inner join posts p on p.id=v.postid
where PostTypeId = 1 and v.VoteTypeId in (2,3)
group by v.postid,p.ViewCount, p.creationdate
order by  'Ratio' desc

Enter Parameters

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