CREATE TABLE PersonFriend (name VARCHAR2, friend VARCHAR2)
CREATE TABLE Person (name VARCHAR2, gender VARCHAR2)

Find the names of females who are friends with Zach
SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'
SELECT "T1"."name" FROM "Person" "T1" JOIN "PersonFriend" "T2" ON "T1"."name" = "T2"."name" AND "T2"."friend" = 'Zach' WHERE "T1"."gender" = 'female'