Date parts
The date_part() function is useful when you want to aggregate data by a unit of time across multiple larger units of time. For example, aggregating data by month across different years, or aggregating by hour across different days.
Recall that you use date_part() as:
SELECT date_part('field', timestamp);
In this exercise, you'll use date_part() to gain insights about when Evanston 311 requests are submitted and completed.
Deze oefening maakt deel uit van de cursus
Exploratory Data Analysis in SQL
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
-- Extract the month from date_created and count requests
SELECT ___ AS month,
___
FROM evanston311
-- Limit the date range
WHERE ___
AND ___
-- Group by what to get monthly counts?
GROUP BY ___;