answers that should have votes

2

Please login or register to vote for this query.

(click on this box to dismiss)

answers by specified user(s) that "should" have votes

Moderators

Q&A for community managers, administrators, and moderators

select 
  RANK ( ) OVER (
    partition by a.owneruserid 
    ORDER BY 
      case when a.acceptedanswerid is null then 0 else 1 end desc,
      round(q.ViewCount/100,0) desc,
      round(len(a.body)/100,0) desc 
      ) as rnk,
  a.owneruserid as [User Link],
  a.id as [Post Link],
  case when a.acceptedanswerid is null then 0 else 1 end as accepted, 
  format(a.creationdate,'yyyy-MM-dd') as answered,
  len(a.body) as length,
  q.ViewCount as Views,
  a.score as [A Score],
  q.score as [Q Score]
into #tmp
from posts a left join posts q on q.id=a.parentid
where a.posttypeid=2
and a.owneruserid in ( ##UserID## )
and a.score <=0

select * from #tmp where rnk <= 21
order by rnk, views desc, [User Link]

--UserID: Enter one or more (comma separated) numeric UserID's:

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results