Quick Check 4.8 – Data 100, Summer 2020
Sign in to Google to save your progress. Learn more
(Summer 2019 Midterm) For the following questions consider the following tables. The trfc table contains one row per sensor recording of hourly average car speed in mph. The time column contains strings that encode the hour of day and whether the time occurred during rush hour. The dates table contains one row for all dates in 2019 with their days of the week.
Create a table t with one row per recording in trfc. Each row should contain the day of week, speed, hour of day as a two-character string, and whether the recording occurred during rush hour (either“yes” or “no”).  Fill in the following query: CREATE TABLE t AS SELECT day, spd, SUBSTR(time, 4, 2) AS hr, CASE WHEN _________ LIKE  '%no' THEN _____________ ELSE _____________ END AS rush FROM trfc JOIN dates ON dt = date;
What should be in the first blank? *
What should be in the second blank? *
What should be in the third blank? *
Submit
Clear form
This form was created inside of UC Berkeley. Report Abuse