Doubt in Consultation

0

Good evening, I've been trying to make this query, but unfortunately, I can not find the way to put the name of the state of origin and destination.

The Diagram itself is too extensive, but in this particular part it is where I do not understand how I can do it.

I know the next query is wrong, but it is to let them understand what I want to show.

SELECT E.nombre as Estado_Origen, E.nombre as Estado_Destino
FROM ORIGEN O, DESTINO D, ESTADO E
WHERE O.id_estado = E.id_estado
AND D.id_estado = E.id_estado

PDTA: I'm still starting, and my teacher does not like it very much that I use the INNER JOIN'S, but I can gladly learn for this kind of consultations.

Thank you very much!

    
asked by Kris Phoenix 12.12.2018 в 04:55
source

0 answers