SELECT p0_.id AS id
FROM product p0_
LEFT JOIN product_color_group p7_ ON p0_.id = p7_.product_id
LEFT JOIN color_group c3_ ON c3_.id = p7_.color_group_id
WHERE (c3_.id IN (8, 15))
HAVING COUNT(DISTINCT c3_.id) = 2
ORDER BY p0_.id ASC
LIMIT 100;
HAVING COUNT(DISTINCT c3_.id) = 2
GROUP BY p0_.id
HAVING COUNT(c3_.id) = 2