開始使用免費開始

客戶人數

你需要為一場簡報提供客戶人數的總覽。

本練習屬於課程

以資料驅動的 SQL 決策制定

檢視課程

練習說明

  • 產生一個資料表,包含:所有客戶的總人數、各國家的客戶人數,以及各國家中女性與男性的客戶人數。
  • 依國家與性別排序結果。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

-- 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
編輯並執行程式碼