Exercise

Treating duplicates

In the previous exercise, you reviewed the concept of ROW_NUMBER(). In this exercise, you will use it in your code.

You want to select all the rows from the flight_statistics table that are duplicated. After that, you want to get all the rows without duplicates. You consider that the repeating group for this table is formed by the columns airport_code, carrier_code, and registration_date.

Instructions 1/3

undefined XP
    1
    2
    3
  • First of all, apply the ROW_NUMBER() function to the flight_statistics table.
  • Consider that partitions will be formed by the columns airport_code, carrier_code, and registration_date.