Question: What are names of patients who made an appointment?
Schema: create table appointment (patient varchar, PRIMARY KEY (patient)); create table patient (ssn varchar, PRIMARY KEY (ssn))
SQL: select name from appointment as t1 join patient as t2 on t1.patient = t2.ssn