I am very new to SQL and I am working on a query. I am to use a flat select statement

I am to :
Print all S#s such that the indicated supplier supplies a
London project and also supplies a Paris project

There are 3 tables, one with supplier information (S), one with jobs (J), one with parts (P) and one with shipments (SPJ).

This is what I have but it doesn't work

J.city = 'London' or J.city = 'Paris'
and J.j# = SPJ.j#
and SPJ.s# = S.s#

This is returning all the suppliers that ship to either Paris or London but not both.

Please help. Thx

use a select with a subselect

don't know your columns but you basically need to just issue your query twice and use something like

select * from s, spj, j where s.id in 
(select s.id from s, spj, j where j.city='london') and j.location = 'paris'

i didn't put your joins in there, cause i don't know what j# or s# is, but this is how to do it