sql alternative to max statement 1

sql alternative to max statement

--Find the MAX value row without the use of the MAX() Function

select column_a, column_b, column_value
from table_name
order by column_value desc
fetch first 1 rows only;

Here is what the above code is Doing:
1. Select the columns you want to see
2. Order the rows by the column you want to find the max value of
3. Fetch the first row only

Similar Posts