Lesson 8.3 · Pro

Find and remove duplicates

Spot duplicate rows, then keep just one per group, usually the newest.

In this lesson

  1. Find duplicates with GROUP BY and HAVING
  2. Keep one row per group with DISTINCT ON
  3. Remove repeats before you count