blob: b3e0830922667fb125e8d7056156ad402ce6f788 [file] [view]
---
{
"title": "MAX",
"language": "en",
"description": "The MAX function returns the maximum value of the expression."
}
---
## Description
The MAX function returns the maximum value of the expression.
## Syntax
```sql
MAX(<expr>)
```
## Parameters
| Parameters | Description |
| -- | -- |
| `expr` | The expression needs to be obtained |
## Return Value
Returns the same data type as the input expression.
## Example
```sql
select max(scan_rows) from log_statis group by datetime;
```
```text
+------------------+
| max(`scan_rows`) |
+------------------+
| 4671587 |
+------------------+
```