MAX
returns NULL.
Syntax
Parameters
Parameter | Description | Supported input types |
---|---|---|
<expression> | The expression whose maximum to determine | Any type |
Return Types
Same as input typeExamples
Example This code example uses the followingtournaments
table:
name | totalprizedollars |
---|---|
The Drifting Thunderdome | 24,768 |
The Lost Track Showdown | 5,336 |
The Acceleration Championship | 19,274 |
The Winter Wilderness Rally | 21,560 |
The Circuit Championship | 9,739 |
totalprizedollars
column, MAX
will return the highest value, as follows:
24,768
Example
MAX
can also work on text or array columns, in which case it returns the lexicographically largest value. In this example, the function assesses the name
column in the tournaments
table.
The Winter Wilderness Rally