-1 means 'not available'
Beginnersentinel valuesVehicle fuel economy (FuelEconomy.gov, model years 2010–2027)
In this data, co2 = -1 means 'not available'. How many records have that placeholder?
Solution
SELECT COUNT(*) FROM vehicles WHERE co2 = -1;Expected output:
Hint
It's a number, so compare with = -1.
Same question in Excel / Google Sheets
=COUNTIF(O:O,-1)
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.