SQL funkcie na výpočet súhrnných hodnôt podľa databáz
SQL -> Funkcie -> funkcie na výpočet súhrnných hodnôt
Prepnúť na rozdelenie podľa funkcií
Function | DB2 | SQLite | MySQL | PostgreSQL | Firebird | Virtuoso | Oracle | MSSQL |
---|---|---|---|---|---|---|---|---|
Počet záznamov za stĺpec x | COUNT( [DISTINCT] x) | ? | COUNT( [DISTINCT] x) | COUNT( [DISTINCT] x) | COUNT( [DISTINCT] x) | ? | COUNT( [DISTINCT] x) | COUNT( [DISTINCT] x) |
Sum of x | SUM( [DISTINCT] x) | ? | SUM(x) | SUM( [DISTINCT] x) | SUM(x) | ? | SUM( [DISTINCT] x) | SUM( [DISTINCT] x) |
Average of x | AVG( [DISTINCT] x) | AVG(x) | AVG( [DISTINCT] x) | AVG( [DISTINCT] x) | AVG(x) | ? | AVG( [DISTINCT] x) | AVG( [DISTINCT] x) |
Minimum value in x | MIN(x) | MIN(x) | MIN(x) | MIN(x) | MIN(x) | ? | MIN(x) | MIN(x) |
Maximum value in x | MAX(x) | MAX(x) | MAX(x) | MAX(x) | MAX(x) | ? | MAX(x) | MAX(x) |
Štandardná odchýlka | STDDEV( [DISTINCT] x) | N/A | STD(x), STDDEV(x), STDDEV_POP(x) | STDDEV(x), STDDEV_POP(x), STDDEV_SAMP(x) | N/A | STDDEV(x, y) | STDDEV( [DISTINCT|ALL] x) | STDEV(x), STDEVP(x) |
Variance | VARIANCE([DISTINCT] x) | N/A | VARIANCE(x), VAR_POP(x) | VARIANCE(x), VAR_POP(x), VAR_SAMP(x) | N/A | VAR(x) | VARIANCE(x) | VAR(x), VARP(x) |