I have a table stock
which brings me (among other things) the id of other tables, what I need is to make a query that instead of bringing the ID of the other tables, bring the name of the corresponding element to said Id.
The diagram of the BD is as follows
and the consultations carried out are the following:
The arrows indicate where each result should go, in the case of id_element
, this should bring element
, which in turn has a id_elementBase
, which has the name that I need to show.
I tried using inner join
but I did not manage to make it work correctly, and using and
the result is incorrect.
Thanks for your help!