Doubt the the Case exercise


SELECT    state, 
    COUNT(CASE WHEN elevation >= 2000 THEN 1 ELSE NULL END) as count_high_elevation_aiports 
FROM airports 
GROUP BY state;

what is the function of THEN 1 in this statement. What does '1' signify?


It simply populates the field with a non-null value for the count function.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.