CommencerCommencer gratuitement

Tallying corner parking violations

The parking_violation table has two columns (street_name and intersecting_street) with New York City streets. When the values for both columns are not NULL, this indicates that the violation occurred on a corner where two streets intersect. In an effort to identify street corners that tend to be the location of frequent parking violations, you have been tasked with identifying which violations occurred on a street corner and the total number of violations at each corner.

In this exercise, you will concatenate the street_name and intersecting_street columns to create a new corner column. Then all parking violations occurring at a corner will be tallied by a SQL query.

Cet exercice fait partie du cours

Cleaning Data in PostgreSQL Databases

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

SELECT
  -- Combine street_name, ' & ', and intersecting_street
  ___ ___ ' & ' ___ ___ AS ___
FROM
  parking_violation;
Modifier et exécuter le code