始める無料で始める

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.

この演習はコースの一部です

Cleaning Data in PostgreSQL Databases

コースを見る

実践的なインタラクティブ演習

このサンプルコードを完成させて、この演習に挑戦してみましょう。

SELECT
  -- Combine street_name, ' & ', and intersecting_street
  ___ ___ ' & ' ___ ___ AS ___
FROM
  parking_violation;
コードを編集して実行