Question: Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.
Schema: create table treatments (professional_id varchar, PRIMARY KEY (professional_id)); create table professionals (professional_id varchar, last_name varchar, cell_number varchar, PRIMARY KEY (professional_id)); create table professionals (professional_id varchar, last_name varchar, cell_number varchar, state varchar, PRIMARY KEY (professional_id))
SQL: select professional_id, last_name, cell_number from professionals where state = 'indiana' union select t1.professional_id, t1.last_name, t1.cell_number from professionals as t1 join treatments as t2 on t1.professional_id = t2.professional_id group by t1.professional_id having count(*) > 2