Doubt the the Case exercise


#1




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?


#2

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


#3

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