Finding Duplicate Rows Using ROW_NUMBER() | Essential SQL
HTML-код
- Опубликовано: 1 авг 2024
- Here is a really easy way, using a window function, to find duplicate rows within a result. By using the ROW_NUMBER function we'll identify one or more duplicates within a partition, or that is, the columns we are checking for duplicates.
Наука
Really well explained and easy to understand. Keep making more of this - you absolutely earned my sub :)
Awesome, thank you!
This is the video I needed!
I’m glad you found it!
Out of all the videos I have searched on this topic..this video is best
Hi! Thanks for the kind remarks. I appreciate it!
Thank you so much for this, very well explained!
Glad it was helpful!
this was very helpful!
I'm glad you found it useful!
Great explanation thanks so much, this has really helped 👍🏽
Glad it helped!
subbed!!
Very Helpful , Thanks
Thanks! I'm glad you liked it!
How can you delete the duplicates when the permanent table won't have a unique column like riw number?
That's for this helped out
Glad it helped - have a great day!
you made it click for me, thanks
Thats awesome! Let me know if there are other topics you want to hear about.
Great Video Essential SQL. Which editor are you writing your SQL in?
I'm using Azure Data Studio. It's cross platform.
Great video
Thanks for the visit
Hi there.
How would you do if you want to find duplicate rows in a table with over 30 columns?
Thank you 😊
You can either add all 30 columns to your Partition By clause, or figure out what columns really matter and just include those.
what is this software that you are using to query databases ?
Azure Data Studio
I'm using Azure Data Studio. It my goto SQL tool now. :)
How to update one record from duplicate (all value are same)
When you use row_number you can elects how to pick the duplicate. So you can update the “first row” or via some other means.
That’s what makes window functions so flexible.
I go over this in my course.
how to delete duplicate records using row_number in SQL