I am having trouble creating a select query that contains a join and a NOT. Any help would be greatley appreciated.
I have a table A consisting of
person_id, name
I have a table C consisting of
person_id, group_id
I want to get every A.person_id that doesnt exist in table C and C.group id cant be equal to 3
For Example
Table A
person_id name
1 dog
2 cat
3 cow
4 goat
5 mouse
6 deer
Table C ---
person_id group_id
1 3
4 4
4 2
4 3
1 7
15 3
The result im trying to get would be from table A
2 cat
3 cow
5 mouse
6 deer
Thanks in advance.