Top answers per question

0

Please login or register to vote for this query.

(click on this box to dismiss)

Top answers per question

Web Applications

Q&A for power users of web applications

-- Top answers per question
-- Top answers per question
with x as(

SELECT Posts.ParentId,Posts.body, Posts.Score, ROW_NUMBER()
OVER(PARTITION BY Posts.ParentId ORDER BY Posts.Score desc) num
FROM Posts where posts.PostTypeId =2
)

--Select x.ParentId, x.num as [rank], x.Score,x.body from X where num <5
Select  x.num as [rank], x.Score,x.body from X 
where num <##NumberofAnswers:int##+1 and x.ParentId = ##QuestionID:int##

Enter Parameters

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