# STDDEV\_SAMP

## Syntax

```sql
STDDEV_SAMP(expr)
```

## Description

Returns the sample standard deviation of `expr` (the square root of [VAR\_SAMP()](https://mariadb.com/docs/server/reference/sql-functions/aggregate-functions/var_samp)).

It is an [aggregate function](https://mariadb.com/docs/server/reference/sql-functions/aggregate-functions), and so can be used with the [GROUP BY](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/group-by) clause.

`STDDEV_SAMP()` can be used as a [window function](https://mariadb.com/docs/server/reference/sql-functions/special-functions/window-functions).

`STDDEV_SAMP()` returns `NULL` if there were no matching rows.

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}
