
How to Use a SQL Rank Function to Deduplicate a Table
What’s the worst smelling SQL statistic? Rank! Nevertheless, it can be quite helpful for deduplicating tables, which is exactly what we’ll use it for in the video above!
In the training video above, we walk through how to use a Rank function in SQL. We walk through several scenarios to show how it works in cases of ties and duplicate records.
If you want to run the code alongside the video (not critical) and don’t already have SQL Server Management Studio installed, here is the link to download it.
You can download the SQL code used in the training here.
If you want to learn more about SQL data manipulation, you can check out our intro to SQL training here, which covers selecting data from a data table, creating new columns, joining tables together, and aggregating and grouping data.
You can watch the training on joins in SQL here.
You can watch the training on subqueries in SQL here.
We hope this video “ranks” high on your list of SQL trainings!


