고객 수
발표를 위해 고객 수에 대한 개요를 제공해야 합니다.
이 연습은 강의의 일부입니다
SQL로 하는 데이터 기반 의사결정
연습 안내
- 전체 고객 수, 국가별 고객 수, 그리고 국가별 성별(여성/남성) 고객 수를 포함한 표를 만드세요.
- 결과를 country와 gender 기준으로 정렬하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
-- Count the total number of customers, the number of customers for each country, and the number of female and male customers for each country
SELECT country,
gender,
COUNT(*)
FROM customers
___ (___, ___)
___ ___, ___; -- Order the result by country and gender