/*
Find the jnum of projects that have
5 or more shipments from suppliers
that live in a different city than the project city
*/

select spj.jnum
from spj, proj, supplier
where spj.jnum=proj.jnum
  and spj.snum=supplier.snum
  and proj.city != supplier.city
group by spj.jnum
having count(*) >= 5
