Müşteri sayısı
Bir sunum için müşteri sayısına dair bir genel bakış hazırlaman gerekiyor.
Bu egzersiz
SQL ile Veri Odaklı Karar Verme
kursunun bir parçasıdırEgzersiz talimatları
- Toplam müşteri sayısını, her ülke için müşteri sayısını ve her ülke için kadın ve erkek müşteri sayısını içeren bir tablo oluştur.
- Sorgu sonucunu ülke ve cinsiyete göre sırala.
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
-- 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