# STDDEV_SAMP() Function

### Description

Calculates the standard deviation of a numeric column or expression

### Syntax

```sql
STDDEV_SAMP(expression)
```

### Parameters

| Parameter | Description | Data Type | Required |
| --- | --- | --- | --- |
| _expression_ | Column or expression to evaluate | Numeric | Yes |

#### Notes

-   Scaled by 1/(N-1)
-   Can also be used inside of window aggregates
-   When used as a window aggregate, include an `OVER (...)` clause.
-   Use `QUALIFY` (not `WHERE`) to filter rows based on a window calculation.

### Example

```sql
SELECT
    department, STDDEV_SAMP(salary) OVER (PARTITION BY department ORDER BY start_date) AS std
FROM
    rippling.employee.Employee;
```

Source: https://developer.rippling.com/documentation/rippling-platform/transformations/sql-reference/stddev_samp

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
