Question: what are name and phone number of patients who had more than one appointment?
Schema: create table appointment (patient varchar, PRIMARY KEY (patient)); create table patient (ssn varchar, PRIMARY KEY (ssn))
SQL: select name, phone from appointment as t1 join patient as t2 on t1.patient = t2.ssn group by t1.patient having count(*) > 1