0 votes
1 view
in SQL by (36.2k points)

Can anyone explain how to get max value in SQL?

1 Answer

0 votes
by (87.5k points)

The aggregate function MAX () is used to find the maximum value of the selected column in SQL. The following is the syntax to find max value in the selected column:

SELECT MAX(ColumnName)
FROM TableName
WHERE condition;

The following statement returns the top salary of the employee table:

SELECT MAX(Salary) as Maximum_Salary

FROM Employee

If you want to learn MAX () and other aggregate functions with complex queries, you can check out this SQL tutorial.

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !