https://school.programmers.co.kr/learn/courses/30/lessons/131532
프로그래머스
SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
select year(sales_date) as year, month(sales_date) as month, gender, count(distinct(user_id)) as users
from user_info natural join online_sale
where gender is not null
group by year, month, gender
order by year, month, gender
'코딩테스트 > MySQL' 카테고리의 다른 글
[프로그래머스 Level 4] 주문량이 많은 아이스크림들 조회하기 (MySQL) (0) | 2025.02.08 |
---|---|
[프로그래머스 Level 4] 우유와 요거트가 담긴 장바구니 (MySQL) (0) | 2025.02.07 |
[프로그래머스 Level 4] 저자 별 카테고리 별 매출액 집계하기 (MySQL) (0) | 2025.01.31 |
[프로그래머스 Level 4] 서울에 위치한 식당 목록 출력하기 (MySQL) (0) | 2025.01.28 |
[프로그래머스 Level 4] 취소되지 않은 진료 예약 조회하기 (MySQL) (0) | 2024.12.08 |