I want to express the following in relational algebra:
Given a table of
PEOPLE: ID, SocietyName
Where the combination of ID and SocietyName form a key such that we could have the same ID in the table more than once but paired with a different society name.
I would like to be able to output all pairs of people, ID1 and ID2 such that they do not both attend any of the same societies. I am struggling to structure this in my head, I think I will need to rename PEOPLE to p1 and p2 say, then do some kind of join but I am not sure how to refine the output so it is only pairs where none share the same society.