Mapping parking restrictions
You are interested in building a mobile parking recommendation app for New York City. The goal is to use the parking_violation dataset to map parking restrictions to a driver's location. Parking restrictions are stored in the days_parking_in_effect column in a format that consists of a string of 7 characters. Each position in the string represents a day of the week (Monday-Sunday). A B indicates parking is restricted and a Y indicates parking is allowed. A colleague has organized the data from parking_violation by creating a table named parking_restrictions, which includes the street_address, violation_county, and days_parking_in_effect.
In this exercise, you will use REGEXP_SPLIT_TO_TABLE() and ROW_NUMBER() to associate each street address to its parking availability.
Este ejercicio forma parte del curso
Cleaning Data in PostgreSQL Databases
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
SELECT
-- Specify SELECT list columns
___,
___,
___(___, ___) AS daily_parking_restriction
FROM
parking_restriction;