I have the following three tables:
With the following information: Recipe:
Ingredient:
RECIPE_INGREDIENTE:
Now for example I want to bring the recipes that have the ingredients leche(6) y Azúcar(7)
The result that I hope is:
Pay de limón
Chocolate
Try the following without success:
select * from RECETA_INGREDIENTE RI
INNER JOIN RECETA R
ON R.ID_RECETA = RI.ID_RECETA
INNER JOIN INGREDIENTE I
ON I.ID_INGREDIENTE = RI.ID_INGREDIENTE
where RI.ID_INGREDIENTE = 6 AND RI.ID_INGREDIENTE = 7;