MAX() Function


 

SQLite: MAX Function

This SQLite tutorial explains how to use the SQLite MAX function with syntax and examples.

 

Description:
The SQLite MAX function returns the maximum value of an expression.

 
Syntax:

OR Grouping the results by one or more columns is:

 

Parameters or Arguments:

expression1, expression2, … expression_n

The expressions that are not encapsulated within the MAX function and must be included in the GROUP BY clause at the end of the SQLite statement.

aggregate_expression

This is the column or expression from which the maximum value will be returned.

tables

The tables that you wish to retrieve records from. There must be at least one table listed in the FROM clause.

conditions

These are conditions that must be met for the records to be selected.

 

Examples:
The following SQLite statement returns the largest value of the “salary” columns from the “Account” table:

MAX(salary)
60000