Material table :

```
**ID_Material(PK)**         **Material_Name**      **Type**
DXTR1000                    Deluxe Touring Bike     Finished Good
CHAN1000                    Chain                   Raw
BOLT3000                    Socked Bolt             Raw
TRTR1000                    Touring Tire            Semi Finished

```

---

Detail\_Material Table

```
**ID_Material (PK,FK)**    **ID_Material_MadeOf (PK,FK)**  **Qty**
DXTR1000                     CHAN1000                       1
DXTR1000                     TRTR1000                       5
DXTR1000                     BOLT1000                       2

```

---

i want the query output to show list of materials needed to make an finished good.

i made this query :

```
SELECT *
FROM material m
INNER JOIN detail_material d ON (m.id_material = d.id_material)
WHERE m.id_material IN (
        SELECT id_material_madeof
        FROM detail_material
        WHERE id_material = 'DXTR1000'
        );

```

it return nothing