Uzdevums 1

0

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles Meta

Q&A about the site for people who build and repair bicycles, people who train cycling, or commute on bicycles

SELECT TOP 10
    Posts.Id,
    Tags,
    COUNT(DISTINCT PostTags.TagId) AS Tag_Amount
FROM Posts
LEFT JOIN PostTags
    ON PostTags.PostId = Posts.Id
GROUP BY Posts.Id, Tags
HAVING COUNT(DISTINCT PostTags.TagId) = 2
ORDER BY Tag_Amount DESC;

Enter Parameters

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