Test

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

--select pt.Id, pt.Tags
--from (
select p.Id as postId, count(distinct pt.TagId) as tagsNum
from PostTags pt
inner join Posts p on p.Id=pt.postId
group by p.Id
having count(distinct pt.TagId)=1
----) t
--join PostTags pt on (t.postId=pt.Id)

Enter Parameters

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