> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-functions/aggregate-functions/stddev_samp.md).

# STDDEV\_SAMP

## Syntax

```bnf
STDDEV_SAMP(expr)
```

## Description

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

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

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

`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" %}
