Reviews on a Post

0

Please login or register to vote for this query.

(click on this box to dismiss)

You know how they never give us the feature to look up reviews by the post involved? Well, now you can.

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

WITH ReviewUris(TypeId, UriComponent) AS (
  SELECT 1, 'suggested-edits/'   UNION
  SELECT 2, 'close/'             UNION
  SELECT 3, 'low-quality-posts/' UNION
  SELECT 4, 'first-posts/'       UNION
  SELECT 5, 'late-answers/'      UNION
  SELECT 6, 'reopen/'
  -- don't know what the rest are
)

SELECT
  'site://review/' + RI.UriComponent + CAST(RT.Id AS NVARCHAR)
    + '|' + CAST(RT.Id AS NVARCHAR) AS [Review Link],
  (SELECT Name FROM ReviewTaskTypes WHERE Id = RT.ReviewTaskTypeId)
    AS [Review Type]
FROM Posts AS P
INNER JOIN ReviewTasks AS RT
  ON P.Id = RT.PostId
INNER JOIN ReviewUris AS RI
  ON RT.ReviewTaskTypeId = RI.TypeId
WHERE P.Id = ##PostId:int##

Enter Parameters

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