I have inherited a table that provides a link between two other tables that looks like this:
id | product_id | category_id
1 | 10 | 20
2 | 10 | 21
3 | 34 | 20
4 | 34 | 21
5 | 34 | 21
6 | 10 | 21
In there, it turns out that row 2 and 6, and rows 4 and 5 are pairs.
How can I write a query to delete the redundant rows?