[T]he more previous reviews a given task has had, the closer to the top of the queue it'll be. [...]
However, preference is also given to the most recently queued items
select concat(
;with taskresults as 'site://review/suggested-edits/'(
,select reviewtasks.idreviewtaskid
, '| review forcount(*) '[all]
, sum(case p.posttypeid
when ReviewTaskResultTypeId = 2 whenthen 1 thenelse 'Q:0 'end) [Approve]
, sum(case when 2 then 'A: '
ReviewTaskResultTypeId = 3 then when1 4else then0 'Excerpt:end) '[Reject]
, sum(case when ReviewTaskResultTypeId = 5 then 'wiki:1 '
else 0 end) [Edit]
else '?, '
sum(case when ReviewTaskResultTypeId = 19 then 1 else 0 end
) [Rej.Edt]
, coalescesum(q.title, ' some tag') ) [Review Link]
case when ReviewTaskResultTypeId ,= reviewtasks.creationdate
1 then 1 else 0 ,end) reviewtasks.deletiondate[Skip]
, (select count(*) from reviewtaskresults
where reviewtaskid =group by reviewtasks.idreviewtaskid
) [# reviews]
,
select concat(
select count(*)'site://review/suggested-edits/'
from reviewtaskresults where reviewtaskid = , reviewtasks.id
, and'| ReviewTaskResultTypeIdreview =for 2'
) [Approve]
, (
case p.posttypeid
select count(*) from reviewtaskresults wherewhen reviewtaskid1 =then 'Q: reviewtasks.id'
and ReviewTaskResultTypeIdwhen =2 3
then 'A: '
) [Reject]
when 4 then ,'Excerpt: ('
select count(*) from reviewtaskresults wherewhen reviewtaskid5 =then 'wiki: reviewtasks.id'
and ReviewTaskResultTypeIdelse ='? 5'
) [Edit]end
, coalesce(
q.title, tw.tagname, te.tagname) ) [Review Link]
select count(*) from, reviewtaskresultsreviewtasks.creationdate
where reviewtaskid = , reviewtasks.iddeletiondate
, and ReviewTaskResultTypeId[all] =[# 19reviews]
, [Approve]
) [Edit] , [Reject]
, (
[Edit]
select count(*), from reviewtaskresults[Rej.Edt] where reviewtaskid = reviewtasks.id
, and[Skip] ReviewTaskResultTypeId = 1
from reviewtasks
inner join )taskresults [Skip]rtr on rtr.reviewtaskid
from= reviewtasks.id
inner join posts p on p.id = postid
inner join posts q on q.id = coalesce(p.parentid, p.id)
-- left outer join tags ttw on ttw.wikipostid = p.idpostid or
left touter join tags te on te.excerptpostid = p.idpostid
where reviewtasktypeid = 1 -- suggested edit
order by creationdate desc
, deletiondate asc