/* Query 3B (page 137, 172, 235 of the text book)

   Retrieve the name of each employee who works on all projects
   controlled by department number 4.

   The result must be
	Alicia  Zelaya
	Ahmad   Jabbar
*/

select	e.fname, e.lname
from	employee e
where	not exists
	(select	 *
	 from	 works_on b
	 where	 (b.pno in  (select pnumber
			     from   project
			     where  dnum = 4))
		and
		not exists  (select *
			     from   works_on c
			     where  c.essn = e.ssn
			       and  c.pno = b.pno));
