Seksjon 3. Kapittel 4
single
Challenge: City-Based Sales Analysis
Sveip for å vise menyen
Oppgave
Sveip for å begynne å kode
You have two tables: sales and customers.
sales — records of each individual sale:
customers — information about customers:
Write a query that shows how many sales were made in each city. To do this:
- Join
salesandcustomerson thecustomer_idcolumn. - Group the result by
city. - For each city, count the number of sales using
COUNT()and name the columnsales_count.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 4
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår