SELECT u.* FROM edges u WHERE currtag = 'person'; SELECT u.* FROM edges u, edges v, relations r WHERE u.currtag = 'person' AND v.currtag = 'creditcard' AND u.currid = r.ancestor AND v.currid = r.descendant; (SELECT u.* FROM edges u WHERE currtag = 'person') EXCEPT (SELECT u.* FROM edges u, edges v, relations r WHERE u.currtag = 'person' AND v.currtag = 'creditcard' AND u.currid = r.ancestor AND v.currid = r.descendant);