First account for each country.
Conduct an analysis to see when the first customer accounts were created for each country.
This exercise is part of the course
Data-Driven Decision Making in SQL
Exercise instructions
- Create a table with a row for each country and columns for the country name and the date when the first customer account was created.
- Use the alias
first_account
for the column with the dates. - Order by date in ascending order.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
SELECT ___, -- For each country report the earliest date when an account was created
___ AS first_account
FROM customers
GROUP BY ___
ORDER BY ___;