The MAX() function returns the largest value of the selected column.
Syntax:-
SELECT MAX(column_name) FROM table_name;
Example:-
The subsequent SQL gets the largest value of the “Price” column from the “Hosting” table:-
SELECT MAX(Price) AS HighestPrice FROM Hosting;

 

Categories: SQL Function

0 thoughts on “SQL Max()”

Leave a Reply

Latest Article

SQL Function

SQL Avg()

The AVG() returns the average value of a numeric column. Syntax:- SELECT AVG(column_name) FROM table_name; Example:- The subsequent SQL gets the average value of the “Price” column from the “Hosting” table:- SELECT AVG(Price) AS PriceAverage Read more…

SQL Function

SQL Count()

The COUNT() returns the number of column or rows that matches a specified criteria. Syntax:- The COUNT(column_name) returns the number of values of the specified column:- SELECT COUNT(column_name) FROM table_name; OR SELECT COUNT(*) FROM table_name; Read more…

SQL Function

SQL First()

The FIRST() function returns the first value of the selected column. Syntax:- SELECT FIRST(column_name) FROM table_name; OR SELECT column_name FROM table_name ORDER BY column_name ASC LIMIT 1; Example:- The subsequent SQL selects the first value Read more…