Blank is not NULL
Beginnerblank strings vs NULLVehicle fuel economy (FuelEconomy.gov, model years 2010–2027)
The atv_type column is blank for ordinary gas cars, stored as an empty string, not NULL. How many records have a blank atv_type?
Solution
SELECT COUNT(*) FROM vehicles WHERE atv_type = '';Expected output:
Hint
Try WHERE atv_type IS NULL first and see what happens. Then compare with ''.
Same question in Excel / Google Sheets
=COUNTBLANK(K2:K22112) (Excel treats empty text and empty cells alike here).
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.