Find the id and last name of the teacher that has the most detentions with detention type code "AFTER"?
create table detention (teacher_id varchar, detention_type_code varchar, PRIMARY KEY (teacher_id)); create table teachers (last_name varchar, teacher_id varchar, PRIMARY KEY (last_name))
select t1.teacher_id, t2.last_name from detention as t1 join teachers as t2 on t1.teacher_id = t2.teacher_id where t1.detention_type_code = "after" group by t1.teacher_id order by count(*) desc limit 1