CommencerCommencer gratuitement

Duplicate parking violations

There have been a number of complaints indicating that some New York residents have been receiving multiple parking tickets for a single violation. This is resulting in the affected residents having to incur additional legal fees for a single incident. There is justifiable anger about this situation. You have been tasked with identifying records that reflect this duplication of violations.

In this exercise, using ROW_NUMBER(), you will find parking_violation records that contain the same plate_id, issue_date, violation_time, house_number, and street_name, indicating that multiple tickets were issued for the same violation.

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
  	summons_number,
    -- Use ROW_NUMBER() to define duplicate window
  	___() ___(
        ___ ___ 
            ___, 
          	___, 
          	___, 
          	___, 
          	___
    -- Modify ROW_NUMBER() value to define duplicate column
      ) ___ ___ AS ___, 
    plate_id, 
    issue_date, 
    violation_time, 
    house_number, 
    street_name
FROM 
	parking_violation;
Modifier et exécuter le code