CREATE TABLE patient (ssn VARCHAR2)
CREATE TABLE appointment (patient VARCHAR2)

What are names of patients who made an appointment?
SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn
SELECT "name" FROM "appointment" "T1" JOIN "patient" "T2" ON "T1"."patient" = "T2"."ssn"