A parking violation report by day of the month
Hearing anecdotal evidence that parking tickets are more likely to be given out at the end of the month compared to during the month, you have been tasked with preparing data to get a sense of the distribution of tickets by day of the month. While the date on which the violation occurred is included in the parking_violation
dataset, it is currently represented as a string date. While this presents an obstacle for producing the data required, you feel confident in your ability to get the data in the format that you need.
In this exercise, you will convert the strings representing the issue_date
into proper PostgreSQL DATE
values. From this representation of the data, you will extract the day of the month required to produce the distribution of violations by month day.
Diese Übung ist Teil des Kurses
Cleaning Data in PostgreSQL Databases
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
SELECT
-- Convert issue_date to a DATE value
___ AS issue_date
FROM
parking_violation;