Sectie 2. Hoofdstuk 1
single
Challenge: Total Sales Calculation
Veeg om het menu te tonen
Taak
Veeg om te beginnen met coderen
Write a SQL query against the sales table that returns two summary metrics in a single row.
- Return exactly one row with two columns:
total_sales— total number of rows in the table, usingCOUNT(*)total_quantity— total sum of thequantitycolumn, usingSUM(quantity)
- Use a single
SELECTstatement with no subqueries - Do not use
WHERE,GROUP BY, or any filtering — aggregate the entire table - Column aliases must match exactly:
total_salesandtotal_quantity
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 2. Hoofdstuk 1
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.