Data Cleaning Reps

← All exercises

Events per type

BeginnerGROUP BYEarthquakes (USGS, Oct 2026)

For each type, return the type and how many rows have it. Sort by the count, largest first.

Hint

GROUP BY type, COUNT(*), ORDER BY the count.

Same question in Excel / Google Sheets

Insert → PivotTable: type in Rows, Count of id in Values.

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.

← Not every 'earthquake' is an earthquakeCOUNT(*) vs COUNT(column) →