# VARSAMP

Returns the sample variance of values in a group as `Double`. Sample variance measures the average of the squared deviations from the mean, using Bessel's correction (dividing by N-1 instead of N).

## Signature

> VARSAMP(colName)

## Usage Examples

These examples are based on the [Batch Quick Start](https://docs.pinot.apache.org/start-here/quick-start#batch-processing).

```sql
select VARSAMP(hits) AS value
from baseballStats
WHERE hits > 0
```

| value     |
| --------- |
| 1234.5812 |
