Average mileage per model
Single-table AVG + GROUP BY — before joins complicate the picture
SQL drill • Aggregates
Table vehicles(vin, model, mpg) (mpg = miles per gallon). Return each model with its average MPG across all rows for that model.
Same mechanical pattern as “average sales per region” on a denormalized extract.
Shape
AVG(mpg) GROUP BY model
AVG(mpg) GROUP BY model
Step 0/4Line —
Bucket by model
Press Step or Play.
Ready
Every non-aggregated column in SELECT must appear in GROUP BY (standard SQL).