1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Redshift

Connected

Exercise

Filtering with CTEs

You got a new assignment to create a series of queries based on December's air temperature (hourlydrybulbtemperature) data reading from Coffee County, TN, USA. You decide to build a CTE of just December data so that you can focus on just the main queries and to help make it easier to iterate on all the questions. The first query is supposed to return just the routine hourly weather report at air terminals (FM-15).

Instructions

100 XP
  • Build a CTE named december_readings that selects the provided columns from coffee_county_weather.
  • Filter to dates between '2023-12-01' and '2024-12-31'.
  • Select the date and air_temp columns from the CTE.
  • Further, filter the results to only 'FM-15' report_type.