Let’s say I have 3 SQL tables
Users (id, name) Couples (id, title) UsersInCouples (id, user_id, couple_id)
When user is deleted I need to delete not only all rows with this user from UsersInCouples table, but also all other rows where couples are now left with only one user in it.