SQL for Non-Programmers -- Homework Practice

1

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology

Q&A for enthusiasts and scholars of mythology and folklore

SELECT TOP 10 AVG(p.Score * 1.0), t.Id, T.TagName, COUNT(*)
FROM Posts p
JOIN PostTags pt on pt.PostId = p.Id
JOIN Tags t on t.Id = pt.TagId
WHERE p.PostTypeId = 1 AND p.CreationDate > DATEADD(month, -1, GETUTCDATE())
GROUP BY t.Id, t.TagName
HAVING COUNT(*) > 100
ORDER BY AVG (Score * 1.0) DESC

Enter Parameters

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