<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
This is one of the questions in the conditional aggregate
Find the percentage of high elevation airports (elevation >= 2000) by state from the airports table.
<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
The error is given like this:
Find the percentage of high elevation airports by state.
<In this course, it often helps to include a screenshot of your whole web browser – that lets everyone see what you see. If you wish to include a screenshot, add it below this line.>
Can anyone tell what’s wrong with my code? Thank you!
<If you wish to copy/paste in your code, you can use this next section. This will allow others to copy/paste your code for testing – something that they won’t be able to do with just a screenshot.>
select state, 100.0 * (sum(case when elevation >= 2000 then 1 else 0 end)/sum(elevation)) as percentage_high_elevation_airports
group by state;
<do not remove the three backticks above>