Number of customers
You have to give an overview of the number of customers for a presentation.
This exercise is part of the course
Data-Driven Decision Making in SQL
Exercise instructions
- Generate a table with the total number of customers, the number of customers for each country, and the number of female and male customers for each country.
- Order the result by country and gender.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
-- 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