I’m rather new to SQL I came across this problem:
I have relationship table where person has power
A has X
A has Z
B has X
B has Y
C has Y
D has Z
I want to select all persons with powers X and Y which is in this case B. Of course I will have a more complex power combination.
Do something like this,
if unique constraint was not enforce of
poweron every person, you need to useDISTINCT