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
subquery may do, something like:
SELECT first_name, last_name, rank FROM members WHERE id NOT IN ( SELECT leader FROM groups WHERE leader = members.id )
We need to know your table structure to help you further