How many parts have more than 2 faults?
select count ( * ) from ( 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 )
What are the name's and id's of the parts with more than 2 faults?
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