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 owneruserid ORDER BY case when acceptedanswerid is null then 0 else 1 end desc,
  len(body) desc ) as rnk,
  owneruserid as [User Link],
  id as [Post Link],
  acceptedanswerid,
  case when acceptedanswerid is null then 0 else 1 end as accepted, 
  format(creationdate,'yyyy-MM-dd') as answered,
  len(body) as length
into #tmp
from posts
where posttypeid=2
and owneruserid in ( ##UserID## )
and score <=0
order by owneruserid, acceptedanswerid desc ,
  len(body) desc;
  
select * from #tmp --where rnk in (1,2,3)
order by rnk, [User Link]

Enter Parameters

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