Find questions containing one of the given three tags - ordered by last activity (including answers)

1

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Different

Q&A for power users of Apple hardware and software

SELECT TOP(##num?100##)
  coalesce(p.ParentId, p.Id) AS [Post Link],
---returns the id of the question
---For questions p.ParentId is NULL, so this returns p.Id
  MAX(p.LastActivityDate)
FROM Posts p
WHERE coalesce(p.ParentId, p.Id) IN 
  (SELECT 
  q.Id 
  FROM Posts q INNER JOIN PostTags pt ON q.Id=pt.PostId
  INNER JOIN Tags t ON t.id = pt.TagId
  WHERE (t.TagName=##tag1:string?abstract-algebra##) OR 
    (t.TagName=##tag2:string?geometry##) OR
    (t.TagName=##tag3:string?discrete-mathematics##))
GROUP BY coalesce(p.ParentId, p.Id)
ORDER BY MAX(p.LastActivityDate) DESC

Enter Parameters

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