I have four tables:
cuisines(id, name);
recipes(id, cuisine_id, name, picture);
ingredients(id, name);
ingredients_recipes(ingredient_id, recipe_id);
the last table references the Many-To-Many relationship between recipes and ingredients. How can I select all cuisines which contain tomatoes (i.e. the cuisine has recipes which have ingredients which are called "tomatoes")?
I am using this in SQLite but I guess it's the same in all SQL languages?