In this section the instructions say:
1. Any time enriched_flour
appears in the ingredients list, we’d like to replace it with just flour
. Apply this transformation and also be sure to remove the underscore in enriched_flour
.
The solution button gives this:
SELECT REPLACE(ingredients,'enriched_',' ') as item_ingredients
FROM baked_goods;
My (“WRONG”) solution is this:
SELECT REPLACE(ingredients,'enriched_flour','flour') as item_ingredients
FROM baked_goods;
I feel that my answer is more correct than the solution provided for the following reason.
If any other ingredient in that column contains "enriched_"
that will also be replaced.
For example if there was something like "enriched_chocolate"
it will be changed to " chocolate"
while the instructions say only to replace enriched_flour
.
I know it is redundant to replace flour
too, but it would yield more accurate results if you don’t know what each and every ingredient in that list is.
Maybe I’m not understanding the question correctly? But that’s my take on it.