Busy networks
IntermediateHAVINGEarthquakes (USGS, Oct 2026)
Which reporting networks (net) contributed more than 100 events? Return net and count, largest first.
Solution
SELECT net, COUNT(*) AS n
FROM quakes
GROUP BY net
HAVING COUNT(*) > 100
ORDER BY n DESC;Expected output:
Hint
WHERE filters rows before grouping; HAVING filters groups after.
Stuck? Read Guide 4 — GROUP BY and CASE.
Same question in Excel / Google Sheets
Pivot by net, then filter the pivot's Values to greater than 100. Or, in Excel 365 / Google Sheets: =UNIQUE(M2:M2629) in a free column (for example R) and =COUNTIF(M:M,R2) beside each net, then keep counts greater than 100. Follows Google's documented syntax; not tested in Sheets.
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.