I have another question regarding the exercise 11 on for the project ‘New York Restaurants ‘ in SQL Basic course.
CASE statement to change the rating system to:
review > 4.5is Extraordinary
review > 4is Excellent
review > 3is Good
review > 2is Fair
- Everything else is Poor
How does SQL WHERE order operate? Is it based on the order of the conditions (and parentheses )?
As in, if the review is 4.1 it will be higher 2 and 3 … so it is true for Fair, Good and Excellent… instead I would have written the code
when review > 2 and review <3 then ‘Fair’
when review > 3 and review <4 then ‘Good’
when review > 4 and review <4.5 then ‘Excellent’
when review > 4.5 then ‘Extraordinary’
can someone tell me how sql execute the code?
Thank you for your help