Session Ready
Exercise

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.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Use ROW_NUMBER() with columns plate_id, issue_date, violation_time, house_number, and street_name to define the duplicate window.
  • Subtract 1 from the value returned by ROW_NUMBER() to define the duplicate column.