Math Functions
Math functions help you aggregate, compare, and round numeric values.
| Function | Description | Examples |
|---|---|---|
| SUM | Sum of the arguments | SUM(1, 2, 3) → 6 |
| AVERAGE | Average of the arguments | AVERAGE(1, 2, 3, 4) → 2.5 |
| COUNT | Count numbers | COUNT(1, 2, 3) → 3 |
| MAX | Maximum value | MAX(1, 5, 3) → 5 MAX(-5, -1, -10) → -1 |
| MIN | Minimum value | MIN(1, 5, 3) → 1 MIN(-5, -1, -10) → -10 |
| ROUND | Round to specified decimal places | ROUND(3.14159, 2) → 3.14 ROUND(2.5) → 3 ROUND(2.4) → 2 |
| ROUNDUP | Round up to specified decimal places | ROUNDUP(3.14159, 2) → 3.15 ROUNDUP(2.1) → 3 |
| ROUNDDOWN | Round down to specified decimal places | ROUNDDOWN(3.14159, 2) → 3.14 ROUNDDOWN(2.9) → 2 |
| ABS | Absolute value | ABS(-5) → 5 ABS(5) → 5 |