The five most recent earthquakes
BeginnerSELECT, ORDER BY, LIMITEarthquakes (USGS, Oct 2026)
Return the time, mag and place of the 5 most recent earthquakes in the table, newest first.
Solution
SELECT time, mag, place
FROM quakes
ORDER BY time DESC
LIMIT 5;Expected output:
Hint
Times are ISO-8601 text like 2026-10-31T23:57:55.250Z, so sorting the text sorts by time.
Same question in Excel / Google Sheets
Sort the time column Z→A (Data → Sort) and read the top 5 rows.
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.