How many teachers are there?
select count ( teacher_id ) from teachers
How many of them involve in detention?
select count ( distinct t2.teacher_id ) from teachers as t1 join detention as t2 on t1.teacher_id = t2.teacher_id
Can you show me a list of teachers that are not involve in detention?
select last_name from teachers except select t1.last_name from teachers as t1 join detention as t2 on t1.teacher_id = t2.teacher_id
Can you also include their id?
select last_name ,teacher_id from teachers except select t1.last_name ,t1.teacher_id from teachers as t1 join detention as t2 on t1.teacher_id = t2.teacher_id