How many earthquakes are in the table?
BeginnerCOUNT(*)Earthquakes (USGS, Oct 2026)
Return a single number: how many rows the quakes table has.
Solution
SELECT COUNT(*) FROM quakes;Expected output:
Hint
COUNT(*) counts rows, whatever is in them.
Same question in Excel / Google Sheets
=ROWS(A2:A2629) or =COUNTA(A:A)-1 (minus the header).
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.