顧客数
プレゼンテーション用に、顧客数の概要を提示する必要があります。
この演習はコースの一部です
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