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.
This exercise is part of the course
Cleaning Data in PostgreSQL Databases
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
SELECT
-- Convert issue_date to a DATE value
___ AS issue_date
FROM
parking_violation;