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