I am trying to understand why this code either brings value of 100 or NULL. What am I not getting right? By the way I already know the correct answer but just trying to understand how this code is causing the non 100% results become NULL. Thanks.
SELECT state, 100.00 * (CASE WHEN elevation >= 2000 THEN count(elevation) END / count(*)) as percentage_high_elevation_airports from airports group by 1 order by 1;