Uzdevums 1

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair

Q&A for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

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

Enter Parameters

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