BaşlayınÜcretsiz Başlayın

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.

Bu egzersiz

Cleaning Data in SQL Server Databases

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

SELECT *,
	   -- Apply ROW_NUMBER()
       ___() ___ (
         	-- Write the partition
            ___ BY 
                ___, 
                ___, 
                ___
			ORDER BY 
                airport_code, 
                carrier_code, 
                registration_date
        ) row_num
FROM flight_statistics
Kodu Düzenle ve Çalıştır