Question: Which parts have more than 2 faults? Show the part name and id.
Schema: create table parts (part_name varchar, part_id varchar, PRIMARY KEY (part_name)); create table part_faults (part_id varchar, PRIMARY KEY (part_id))
SQL: select t1.part_name, t1.part_id from parts as t1 join part_faults as t2 on t1.part_id = t2.part_id group by t1.part_id having count(*) > 2