Data Cleaning Reps

← All exercises

Same car, many rows

Intermediateduplicates, HAVINGVehicle fuel economy (FuelEconomy.gov, model years 2010–2027)

A model often has several rows (engines, drives, gearboxes). For 2024, return make, model and the row count for models with 8 or more rows, largest first, then make and model A→Z.

Hint

GROUP BY make, model, then HAVING COUNT(*) >= 8.

Same question in Excel / Google Sheets

Pivot with make + model in Rows, count in Values, value filter ≥ 8.

Download the CSV from the datasets page. Column letters assume the CSV opens with its header in row 1.

Tip: Ctrl+Enter (⌘+Enter on Mac) checks your answer. Everything runs in your browser; nothing you type is sent anywhere.

← Who has no cylinders?Best combined MPG per year (EVs excluded) →