GREATEST()
will return the greatest of the given input values.
LEAST()
will return the least of the given input values.CASE
is the SQL version of a conditional statement.
END
keyword, closing off the conditional statement.WHEN
- Think of like “if true”, WHEN is followed by a condition.THEN
- What to execute if the condition evaluates to true.ELSE
- What to execute if the condition evaluates to false.