Please Help: I Need A Step By Step Detailed Answer, So I Can Understand Exactly What I Need ... Your question has been answered Let
Please Help: I Need A Step By Step Detailed Answer, So I Can Understand Exactly What I Need ... Your question has been answered Let us know if you got a helpful answer. Rate this answer Question: Please Help: I need a step by step detailed answer, so I can understand exactly what I need to do... Please Help: I need a step by step detailed answer, so I can understand exactly what I need to do. The questions below need to be answered in MYSQL syntax code. Can someone help me write the code for the questions below 5 through 7
Please Answer questions below by providing the correct syntax code for sql:
5. List recipe preparation that use Water. 6. List recipe uses Scoop for its measurement 7. List recipes use all measurements
These are the codes that I wrote but they are wrong can some one please help me fix them.
5.) select recipes.recipePreparation from ingredients, recipe_ingredients, recipes where recipes.RecipeID = recipe.ingredients and recipe.IngredientID = Ingredients.IngredientID and ingredients.ingredientName = 'Water';
6) select Measurements.MeasurementDescription from Measurements, RecipeIngredients, Recipes where Measurements.MeasureAmountID = RecipeIngredients.MeasureAmountID and RecipeIngredients.RecipeID = Recipes.RecipeID Measurements.MeasurementDescription = 'Scoop';
7) select * from measurements, recipes, recipeIngredients where Measurements.MeasureAmountID = RecipeIngredients.MeasureAmountID and RecipeIngredients.RecipeID = Recipes.RecipeID groupBy measurementId;
5. List recipe preparation that use Water.
Select Preparation from Recipes where RecipeID in(
Select RecipeID from Recipe_Ingredients where IngredientID in (
Select IngredientID from Ingredients where IngredientName = Water
)
);
6. List recipe uses Scoop for its measurement
Select * from Recipes where RecipeID in (
Select RecipeID from Recipe_Ingredients where MeasureAmountID in (
Select MeasureAmountID from Measurements where MeasurementDescription=Scoop
)
I also tried these codes for questions 5 and 6:
INGREDIENT CLASSES INGREDIENTS IngredientClassID IngredientClassDescription PK IngredientID IngredientName IngredientClassID FK MeasureAmountID FK PK MEASUREMENTS MeasureAmountID MeasurementDescription PK RECIPEINGREDIENTS - RecipelD RecipeSeqNo IngredientID MeasureAmountID FK Amount CPK CPK FK RECIPES RecipelD RecipeTitle RecipeClassID FK Preparation Notes PK RECIPE CLASSES RecipeClassID RecipeClassDescription PK
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started