select top 100 C.id as [User Link], count(D.postId) as po...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

select top 100 C.id as [User Link], 
count(D.postId) as posts,
sum(D.downvotes) as downvotes,
datediff(dd,C.CreationDate,getdate()) as age,

100*sum(D.downvotes)/datediff(dd,C.CreationDate,getdate())as score2

from Users as C inner join (
  select A.id as postId, A.ownerUserId as userId, B.downvotes
  from Posts as A inner join (  
    select postId, count(*) as downvotes
    from Votes
    where voteTypeId = 3
    group by postId ) as B
  on A.id = B.postId ) as D
on C.id = D.userId
where C.Reputation != 1
group by C.id,D.postId,age,C.CreationDate
order by posts desc,score2 desc

Enter Parameters

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