I am trying to get the max number of two numbers and I figured that I cannot do it like this SELECT MAX(2, 4).
I did try to do it like this but got an error.
Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
SELECT MAX( (SELECT LEN('tests') as value
UNION ALL
SELECT LEN('test') as value) );
How can I overcome this or achieve what I want?