CommencerCommencer gratuitement

Recovering deleted data

While maintenance of the film permit data was taking place, a mishap occurred where the column storing the New York City borough was deleted. While the data was backed up the previous day, additional permit applications were processed between the time the backup was made and when the borough column was removed. In an attempt to recover the borough values while preserving the new data, you decide to use some data cleaning skills that you have learned to rectify the situation.

Fortunately, a table mapping zip codes and boroughs is available (nyc_zip_codes). You will use the zip codes from the film_permit table to re-populate the borough column values. This will be done utilizing five sub-queries to specify which of the five boroughs to use in the new borough column.

Cet exercice fait partie du cours

Cleaning Data in PostgreSQL Databases

Afficher le cours

Exercice interactif pratique

Passez de la théorie à la pratique avec l’un de nos exercices interactifs

Commencer l’exercice