You are viewing an older version of this section. View current production version.
Join the SingleStore Community Today
Get expert advice, develop skills, and connect with others.


Aggregate function. Calculates the population variance value from a set of numbers. VARIANCE has synonym VAR_POP which is equivalent. VARIANCE returns NULL if there are not matching rows.


VARIANCE ( expression )


  • expression: any expression. This may be a column name, the result of another function, or a math operation.

Return Type

A double.


memsql> select VARIANCE(table_rows) from information_schema.tables;
| VARIANCE(table_rows) |
|       2.1500    |
1 row in set (2.87 sec)