I seem to be having an issue collapsing my 3 tier subquery to a join statement.
Heres the code :
where aid in (
WHERE cid IN (
where city = 'Kyoto'
Select o.pid from orders o inner join orders oo on oo.aid = o.aid inner join customers c on c.cid = oo.cid and c.city = 'Kyoto'
I think that the aliases (o, oo and c) are necessary to make it work as expected