This is the example code. I think I understand the WHEN concept, it's sort of like 'if' in other programming languages, if this is true = when this is true, but what does that int 1 do? Is it a return value that is read as true? Thanks!
SELECT state, COUNT(CASE WHEN elevation >= 2000 THEN 1 ELSE NULL END) as count_high_elevation_aiports FROM airports GROUP BY state;