본문 바로가기

algorithm

[programmers] MySQL - Lv.4 우유와 요거트가 담긴 장바구니

문제

 

 

 

풀이

 

SELECT cart_id
from cart_products
where name in ('Milk', 'Yogurt')
group by cart_id
having count(distinct name) = 2
order by cart_id