186. 재구매가 일어난 상품과 회원 리스트 구하기

김해준's avatar
Jan 06, 2026
186. 재구매가 일어난 상품과 회원 리스트 구하기

사용언어 : MySQL

문제
notion image
notion image
풀이
select USER_ID, PRODUCT_ID from ONLINE_SALE group by user_id, product_id having count(*) >= 2 order by user_id, product_id desc;
notion image
group by도 여러개를 할 다
Share article