HHH-15589 document var_xxx() and stddev_xxx()

This commit is contained in:
Gavin King 2022-10-08 19:03:30 +02:00
parent f5a5990d03
commit f324204514
1 changed files with 8 additions and 6 deletions

View File

@ -2008,13 +2008,15 @@ Aggregate functions are special functions that reduce the size of the result set
The standard aggregate functions defined in both ANSI SQL and JPQL are:
|===
| Aggregate function | Argument type | Result type
| Aggregate function | Argument type | Result type | JPA standard / ANSI SQL standard
| `count()`, including `count(distinct)`, `count(all)`, and `count(*)` | Any | `Long`
| `avg()` | Any numeric type | `Double`
| `min()` | Any numeric type, or string | Same as the argument type
| `max()` | Any numeric type, or string | Same as the argument type
| `sum()` | Any numeric type | See table below
| `count()`, including `count(distinct)`, `count(all)`, and `count(*)` | Any | `Long` | ✓/✓
| `avg()` | Any numeric type | `Double` | ✓/✓
| `min()` | Any numeric type, or string | Same as the argument type | ✓/✓
| `max()` | Any numeric type, or string | Same as the argument type | ✓/✓
| `sum()` | Any numeric type | See table below | ✓/✓
| `var_pop()`, `var_samp()` | Any numeric type | `Double` | ✗/✓
| `stddev_pop()`, `stddev_samp()` | Any numeric type | `Double` | ✗/✓
|===
In the case of `sum()`, the rules for assigning a result type are: