SQL Window Functions (Climate change task)


I am on question 6 in which it asks you to return a rank of the coldest temperatures on record. I am not sure why my query isn’t returning any results:

SELECT state, year, tempc,
RANK() OVER (ORDER BY temp_c) AS ‘coldest_rank’
FROM state_climate;

Would someone be able to help? The question does not want the data to be partitioned by state or year.

I believe the name of the column is tempc (without an underscore). You wrote temp_c in your ORDER BY :slightly_smiling_face:

1 Like