Question: Show the names of pilots and the number of records they have.
Schema: create table pilot (pilot_name varchar, pilot_id varchar, PRIMARY KEY (pilot_name)); create table pilot_record (pilot_id varchar, PRIMARY KEY (pilot_id))
SQL: select t2.pilot_name, count(*) from pilot_record as t1 join pilot as t2 on t1.pilot_id = t2.pilot_id group by t2.pilot_name