Sektion 3. Kapitel 4
single
Challenge: City-Based Sales Analysis
Stryg for at vise menuen
Opgave
Swipe to start coding
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
Var alt klart?
Tak for dine kommentarer!
Sektion 3. Kapitel 4
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat