Complete the code to return 'High' when score is above 80 using a CASE expression.
SELECT CASE WHEN score [1] 80 THEN 'High' ELSE 'Low' END AS performance FROM results;
The condition checks if the score is greater than 80 to label it as 'High'.
Complete the code to return 'Medium' when score is between 50 and 80 using nested CASE expressions.
SELECT CASE WHEN score > 80 THEN 'High' WHEN score [1] 50 THEN 'Medium' ELSE 'Low' END AS performance FROM results;
The condition checks if the score is greater than or equal to 50 to assign 'Medium' for scores between 50 and 80.
Fix the error in the nested CASE expression to correctly classify scores.
SELECT CASE WHEN score > 80 THEN 'High' WHEN score [1] 50 THEN 'Medium' ELSE 'Low' END AS performance FROM results;
The condition should check if score is greater than or equal to 50 to classify as 'Medium'.
Fill both blanks to classify scores into 'High', 'Medium', or 'Low' using nested CASE expressions.
SELECT CASE WHEN score [1] 80 THEN 'High' WHEN score [2] 50 THEN 'Medium' ELSE 'Low' END AS performance FROM results;
The first condition checks if score is greater than 80 for 'High'. The second checks if score is greater than or equal to 50 for 'Medium'.
Fill all three blanks to create a nested CASE expression that classifies scores into 'Excellent', 'Good', 'Average', or 'Poor'.
SELECT CASE WHEN score [1] 90 THEN 'Excellent' WHEN score [2] 75 THEN 'Good' WHEN score [3] 50 THEN 'Average' ELSE 'Poor' END AS performance FROM results;
The first two blanks use '>' to check if score is above 90 and 75. The third uses '>=' to check greater than or equal to 50 for 'Average'.