السلام عليكم ...
هل هناك طريقة لعرض بيانات الـ inner query في النتيجة النهائية للـ outer query ؟
حيث ما أريد عمله هو
select cage.width, cage.length, cage.height, feed.food_type, medication.medicine, medication.type
from birds
where exists
( select *
from cage
where birds.home like '%Australia%' and birds.cage_code=cage.cage_code
)
and exists
( select *
from feed
where birds.home like '%Australia%' and birds.species=feed.species and birds.type=feed.type
)
and exists
( select *
from infected
where birds.home like '%Australia%' and
birds.species=infected.species and
birds.type=infected.type and
(infected.illness, infected.cause) in ( select medication.illness, medication.cause
from medication
)
);و هذه هي قاعدة البيانات الخاصة بي

و هذا هو السؤال الذي أحاول حله

علما بأن الـ underlined attributes هم الـ primary key لذلك الجدول.