I need to get the biggest value from two fields:
SELECT MAX(field1), MAX(field2)
Now, how can I get biggest value from these two?
SELECT max( CASE WHEN field1 > field2 THEN field1 ELSE field2 END ) as biggestvalue FROM YourTable;