Q:

How to select everything from first table where is based on third table

Well guys I have the following model to explain(I dont have enough reputation to post image), I need query the table ModelosEmUso sending the Carros ID by the User, but I need the ModeloPeca.modelo and ModeloPeca.quantidade instead the FK from ModelosEmUso
I tried several queries but not succeful, I was think about join but I couldn't figure out how do it.
------------
|Carro     |
------------
|idCarro   |
|nome      |  
|catergoria|
-------------
    |
    | 
    |
    |
    |
   /|\
--------------------           ----------------
|ModelosEmUso      |           |ModeloPeca    |
--------------------           ----------------
|idModelosEmUso    |           |idPeca        |
|quantidadeRestante|__________<|modelo        |
|modeloPeca_idPeca |           |quantidade    |  
|carros_idCarros   |           |valor         |
--------------------           |/others coluns|
                               ----------------

PS: bad draw I know, the relationships are OneToMany non-indentifying.
Thanks for all the help.

A:

I'm not entirely sure I understand your question, but it sounds like you just want to do an inner join from ModelosEmUso to ModeloPeca. You don't need to join to Carro because you have carros_idCarros on ModelosEmUso to do your filtering. Maybe something like:
SELECT
     MP.modelo
    ,MP.quantidade
FROM ModelosEmUso ME
    INNER JOIN ModeloPeca MP
        ON ME.modeloPeca_idPeca = MP.idPeca
WHERE ME.carros_idCarros = @USER_PARAM

