Sort answers by question view...

1

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

-- Getting list of answers for a user by question view
SELECT a.Id as [Post Link], 
       a.Score as "Answer Score", 
       q.ViewCount as "Views", 
       q.Score AS "Question Score"
  
FROM Posts a
JOIN Posts q ON a.ParentId = q.Id

WHERE a.OwnerUserId = ##UserId## AND 
      a.PostTypeId = 2

ORDER BY "Views" DESC

Enter Parameters

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