Skip to main content

median

Description​

The MEDIAN function returns the median of the expression.

Syntax​

MEDIAN(<expr>)

Parameters​

ParametersDescription
<expr>The expression needs to be obtained

Return Value​

Returns the same data type as the input expression.

Example​

select median(scan_rows) from log_statis group by datetime;
+---------------------+
| median(`scan_rows`) |
+---------------------+
| 50 |
+---------------------+