YouTube magic that brings views, likes and suibscribers
Get Free YouTube Subscribers, Views and Likes

How to remove Duplicate Data in SQL | SQL Query to remove duplicate

Follow
techTFQ

In this video, we see 10 different ways to remove duplicate records in SQL. We look at 2 different scenario for duplicate records in a table and then come up with 10 SQL queries to remove these duplicate data from the database.

Data can be consider as duplicate if all column values are duplicated or if only some of the column values are duplicated. In this video, you will get solution to remove duplicate data for both these scenarios.

The dataset, scripts and SQL Queries used in this video can be downloaded from below link:
https://techtfq.com/blog/howtoremov...

Have an SQL Query? Would you want me to make a video on it? Then do email me your query to [email protected];

Timestamp:
00:00 Intro about duplicate data in SQL
01:22 Explaining Scenario 1 of Duplicate Data
03:02 SOLUTION 1 Delete using Unique Identifier.
07:19 SOLUTION 2 Using SELF join.
12:21 SOLUTION 3 Using Window function.
15:32 SOLUTION 4 Using MIN function. This delete even multiple duplicate records.
19:34 SOLUTION 5 Using backup table.
24:10 SOLUTION 6 Using backup table without dropping the original table.
26:06 Explaining Scenario 2 of Duplicate Data
27:02 SOLUTION 7 Delete using CTID.
30:25 SOLUTION 8 By creating a temporary unique id column.
33:38 SOLUTION 9 By creating a backup table.
35:30 SOLUTION 10 By creating a backup table without dropping the original table.

My Recommended Courses:
✅ Learn SQL: https://learnsql.com/?ref=thoufiqmoha...

✅ Practice SQL Queries: https://www.stratascratch.com/?via=te...

✅ Learn PowerBI: https://codebasics.io/courses/powerb...

✅ Learn Python: https://codebasics.io/courses/python...


WATCH MORE VIDEOS HERE
✅ SQL Tutorial Basic concepts:
   • SQL Tutorial  Basic concepts  

✅ SQL Tutorial Intermediate concepts:
   • SQL Tutorial  Intermediate concepts  

✅ SQL Tutorial Advance concepts:
   • SQL Tutorial  Advance concepts  

✅ Practice Solving Basic SQL Queries:
   • Practice Solving BASIC SQL Queries  

✅ Practice Solving Intermediate SQL Queries:
   • Practice Solving INTERMEDIATE SQL Que...  

✅ Practice Solving Complex SQL Queries:
   • Practice Solving COMPLEX SQL Queries  

✅ Data Analytics Career guidance:
   • Data Analytics career and more  

✅ SQL Course, SQL Training Platform Recommendations:
   • SQL Course / Training  

✅ Python Tutorial:
   • Python Tutorial  

✅ Git and GitHub Tutorial:
   • Git and GitHub  

✅ Data Analytics Projects:
   • Data Analytics Projects  

THANK YOU,
Thoufiq

posted by Garliny9