So I have a table called members and another table called group.The leader of the group is also a member
To retrieve members,who are not leaders I did the following code
SELECT first_name, last_name, rank FROM members LEFT OUTER JOIN groups ON gid=leader WHERE leader is null
Not sure if leader or gid is in the groups table. The column that is in the groups table must have a null check in the where clause.
leader
gid
groups
null
where