CREATE TABLE people (name VARCHAR, people_id VARCHAR, sex VARCHAR)
CREATE TABLE candidate (people_id VARCHAR)

list all female (sex is F) candidate names in the alphabetical order.
SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name
SELECT "t1"."name" FROM "people" AS "t1" JOIN "candidate" AS "t2" ON "t1"."people_id" = "t2"."people_id" WHERE "t1"."sex" = 'F' ORDER BY "t1"."name" NULLS FIRST