What are all the names of teachers who have taught a course?
select name from instructor as t1 join teaches as t2 on t1.id = t2.id
Also, what were the course ids?
select name, course_id from instructor as t1 join teaches as t2 on t1.id = t2.id