/*CLASS EXCERCISES*/ /* We will be using walmart.weather for all the excercises today*/ /* PART 1: Advanced Queries */ /* 1.1 In the weather database, select rows for station_nbr 3, where the date is in the month of Feb 2012. */ /* 1.2 Select all rows in weather which contain 'BR' in their codesum */ /* 1.3 Select all rows in weather that have both a recorded sunrise time and a sunset time. */ /* PART 2: Aggregate Functions*/ /* 2.1 Find the date(s) with maximum minimum temperature for station_nbr 2. HINT: Using only what we have covered, You will probbaly need to do more than 1 query. In class 3, we will see how to do it with just 1. */ /* 2.2 Select the first and last recording, in terms of date. How many days is the time gap between the first recording in the table and the last recording in the table? HINT: Read up on the DATEDIFF function */ /* 2.3 What is the total precipitation for the month of January in 2013 at station 4 */ /* 2.4 For how many days in January 2012 did station 1 experience distinct values for dewpoint? */ /* PART 3: Group by */ /* 3.1 What is the total precipitation for the month of January in 2013 for all stations? */ /* 3.2 For station 2, in the year of 2012, what was the highest total precipitation over a single month? HINT: Use the function MONTH. Example: MONTH('2012-02-01') = 2 */