Get startedGet started for free

Formatting text for colleagues

A website to monitor filming activity in New York City is being constructed based on film permit applications stored in film_permit. This website will include information such as an event_id, parking restrictions required for the filming (parking_held), and the purpose of the filming.

Your task is to deliver data to the web development team that will not require the team to perform further cleaning. event_id values will need to be padded with 0s in order to have a uniform length, capitalization for parking will need to be modified to only capitalize the initial letter of a word, and extra spaces from parking descriptions will need to be removed. The REGEXP_REPLACE() function (introduced in one of the previous exercises) will be used to clean the extra spaces.

This exercise is part of the course

Cleaning Data in PostgreSQL Databases

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

SELECT 
	-- Add 0s to ensure each event_id is 10 digits in length
	___(___, ___, ___) as event_id, 
    parking_held 
FROM 
    film_permit;
Edit and Run Code