fbpx

3. Locating Duplicate Rows

This advanced SQL exercise is part of the book: Advanced SQL – Practical Techniques and Use-Cases, which includes 100 day-to-day SQL challenges (and solutions), need-to-know advanced features, and key concepts.
 

The same company also needs to locate duplicate rows. The process of transferring data from Excel to SQL Server sometimes results in transferring duplicate rows (rows whose values are equal). This exercise focuses on different techniques for locating and deleting these rows.
 
Given the following table:

CREATE TABLE customers  
        (customer_id int,   
         customer_name varchar(250),   
         customer_address varchar(250),  
         customer_age int)  
GO 

To read more

UpScale Analytics is one of the largest platforms in the world for learning SQL by doing, consisting over 300 SQL exercises at different levels (including solutions), by topics, across over 100 different datasets. More…