SELECT PostTags.PostId, PostTags.TagId, COUNT(*) FROM ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Aviation Meta

Q&A about the site for aircraft pilots, mechanics, and enthusiasts

--mēģināju pielikt Tagus no Posts tabulas, bet nav korekti
--SELECT PostTags.PostId, Posts.Id, Posts.Tags, COUNT(*)
--FROM PostTags, Posts
--WHERE PostTags.PostId=Posts.Id
--GROUP BY PostTags.PostId, Posts.Id, Posts.Tags
--HAVING COUNT(*)=2
--ORDER BY PostTags.PostId ASC


--SELECT PostTags.PostId, PostTags.TagId, Tags.Id, Tags.TagName, Posts.Tags
--FROM PostTags, Tags, Posts
--WHERE PostTags.TagId=Tags.Id AND PostTags.PostId=Posts.Id
--AND PostId IN (14, 66)

SELECT PostTags.PostId, PostTags.TagId, COUNT(*)
FROM PostTags
--WHERE 
GROUP BY PostTags.PostId, PostTags.TagId
HAVING COUNT(*)=2
ORDER BY PostTags.PostId ASC

Enter Parameters

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