728x90
๋ฐ์ํ
โ๋ฌธ์
๐์ ํ
SELECT, GROUP BY
โ๐ปํ์ด
์ฐ์ ๋ฅผ ๊ตฌ๋งคํ CART_ID๋ค ์ค์ CART_ID๊ฐ ํด๋นํ๊ณ ์๊ฑฐํธ๋ ๊ตฌ๋งคํ CART_ID๋ง ์ถ๋ ฅ.
๐ป์ฝ๋
SELECT CART_ID
FROM CART_PRODUCTS
WHERE CART_ID IN (SELECT CART_ID
FROM CART_PRODUCTS
WHERE NAME = 'Milk')
AND NAME = 'Yogurt'
GROUP BY CART_ID
728x90
๋ฐ์ํ