March 23, 2017

Post a New Question

Posted by on Saturday, July 23, 2011 at 8:06pm.

Display a list of all instructors, showing their ID, name, and the number of sections that they have taught. Make sure to show the number of sections as 0 for instructors who have not taught any section. Your query should use an outerjoin, and should not use scalar subqueries.

Is this the right answer:

select ID, name
from instructor natural left outer join
where sec_id = ID
having count (instr_id) > = 0;

Answer This Question

First Name:
School Subject:

Related Questions

More Related Questions

Post a New Question