Tutorial : Try to get 3 answsers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sports

Q&A for participants in team and individual sport activities

SELECT TOP 10
p.Title         AS "Title",
p.Id            AS [Post Link],
p.ViewCount     AS "ViewCount",
p.Body          AS "Question",
a.Body          AS "Accepted Answer"

  
FROM Posts p
full outer JOIN Posts a ON p.AcceptedAnswerId = a.Id
--full outer JOIN Posts b ON b.PostTypeId = 1


inner join posttags pt on pt.postid = p.id
inner join tags t on pt.tagid = t.id

WHERE 
t.tagname in ('perl')  -- tag
AND p.PostTypeId = 1   -- select questions

ORDER BY p.ViewCount DESC

Enter Parameters

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