SELECT top (1000) p.Id,u.DisplayName AS "Asker", 'https:/...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computer Science Educators

Q&A for those involved in the field of teaching Computer Science

SELECT top (1000)
    p.Id,u.DisplayName AS "Asker",
    'https://stackoverflow.com/users/' + CONVERT(VARCHAR, u.Id) AS AskerLink,
    au.DisplayName AS "Answerer",
    'https://stackoverflow.com/users/' + CONVERT(VARCHAR, au.Id) AS AnswererLink,
 
    'https://stackoverflow.com/questions/' + CONVERT(VARCHAR, p.Id) as Link,
    p.Body as QuestionBody,
    p.Tags,
    p.Title,
    FIRST_VALUE(a.Body) OVER (PARTITION BY p.id ORDER BY a.Score DESC) AS HighestScoringAnswer
    
  
FROM Posts p
JOIN Posts a ON p.AcceptedAnswerId = a.Id
--JOIN Posts a ON a.ParentID = p.Id
JOIN Users u ON p.OwnerUserId = u.Id
JOIN Users au ON a.OwnerUserId = au.Id

where p.Id >858778

Enter Parameters

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