Questions that have been answered by both Jon Skeet and Eric Lippert

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS

Q&A for administrators, end users, developers and designers for Craft CMS

-- select p3.parentid
-- from posts p3
-- where p3.posttypeid = 2
-- and p3.owneruserid in (22656, 88656, 11975, 97153)
-- intersect
-- select p4.parentid
-- from posts p4
-- where p4.posttypeid = 2
-- and p4.owneruserid in (22656, 88656, 11975, 97153)

select t1.parentid
from (
  select p1.parentid from posts p1
  union all
  select p2.parentid from posts p2
  ) t1
 group by parentid
 having count(*) = 1
 order by parentid

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results