Data Cleaning Exercises

Glossary

Window function

A SQL calculation over related rows that keeps every row, such as ROW_NUMBER() OVER (PARTITION BY … ORDER BY …).

Window functions rank rows within a group without collapsing them, which is how SQL picks one survivor per key. Always give the ORDER BY a final unique tie-break, or the survivor can change between runs.

Related: Survivor rule, Deduplication