Complete the code to select the greatest value between two columns 'score1' and 'score2'.
SELECT GREATEST(score1, [1]) AS max_score FROM results;The GREATEST function returns the largest value among its arguments. Here, we compare 'score1' and 'score2'.
Complete the code to select the least value between three columns 'price1', 'price2', and 'price3'.
SELECT LEAST(price1, price2, [1]) AS min_price FROM products;The LEAST function returns the smallest value among its arguments. Here, we include 'price3' as the third value.
Fix the error in the code to correctly find the greatest value between 'value1' and 'value2'.
SELECT GREATEST([1], value2) AS highest FROM data;Column names should not be in quotes. Use the exact column name 'value1' without quotes.
Fill both blanks to select the least value between 'temp1' and 'temp2' and alias it as 'lowest_temp'.
SELECT LEAST([1], [2]) AS lowest_temp FROM weather;
The LEAST function compares the two columns 'temp1' and 'temp2' to find the smallest value.
Fill all three blanks to select the greatest value among 'scoreA', 'scoreB', and 'scoreC' and alias it as 'top_score'.
SELECT GREATEST([1], [2], [3]) AS top_score FROM exams;
The GREATEST function returns the highest value among the three scores: 'scoreA', 'scoreB', and 'scoreC'.