#3.31
select ID,name
from instructor
where ID not in (
select ID
from teaches
where (course_id,sec_id,semester,year) in (
select course_id,sec_id,semester,year
from takes
where grade like 'A%'));
#3.32
select instructor.ID,name
from (instructor natural join teaches) join takes
using (course_id,sec_id,semester,year)
where grade is not null
and not exists (select *
from teaches join takes
using (course_id,sec_id,semester,year)
where teaches.ID=instructor.ID
and grade like 'A%')
My answers are as follows: