In regards to New York Restaurants Project
In this query why doesn’t every review get set to ‘Fair’? I thought that once it went through the cases it would ultimately set everything to ‘Fair’ since all the above cases are greater than 2.
select name,
case
when review > 4.5 then ‘Extraordinary’
when review > 4 then ‘Excellent’
when review > 3 then ‘Good’
when review > 2 then ‘Fair’
Else ‘Poor’
End as ‘Rating’
from nomnom;
Thanks!