I have an table of people where each person can have a associate partner like this:
| id_person | Name | id_partner |
|---|---|---|
| 1 | Javi | 5 |
| 2 | John | 4 |
| 3 | Mike | 6 |
| 4 | Lucy | 2 |
| 5 | Jenny | 1 |
| 6 | Cindy | 3 |
So I would like to have a query where I can get all the couples without repetance like
| Name 1 | Name 2 |
|---|---|
| Javi | Jenny |
| John | Lucy |
| Mike | Cindy |
I now how I would do it in python but in sql I have no clue
Thank you in advance!!!