VAR_POP

Sintassi

VAR_POP(espr)

Spiegazione

Restituisce la varianza standard della popolazione di espr. Considera le righe come l'intera popolazione, non un campione, perciò il denominatore è il numero di righe. E' anche possibile usare VARIANCE(), che è equivalente ma non è parte dell'SQL standard.

VAR_POP() restituisce NULL se non vi sono righe.

Esempi

CREATE TABLE v(i tinyint);

INSERT INTO v VALUES(101),(99);

SELECT VAR_POP(i) FROM v;
+------------+
| VAR_POP(i) |
+------------+
|     1.0000 |
+------------+

INSERT INTO v VALUES(120),(80);

SELECT VAR_POP(i) FROM v;
+------------+
| VAR_POP(i) |
+------------+
|   200.5000 |
+------------+

Commenti

Sto caricando i commenti......
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.