# skewSamp (/docs/reference/sql/aggregate-functions/skewsamp)



This page describes the RawTree engine binary used to generate this reference. It does not define Query API support. Descriptions retain upstream ClickHouse terminology. See [SQL interface scope](/docs/reference/clickhouse-compatibility#service-interfaces).

Computes the [sample skewness](https://en.wikipedia.org/wiki/Skewness) of a sequence.

It represents an unbiased estimate of the skewness of a random variable if passed values form its sample.

**Syntax**

```sql
skewSamp(expr)
```

**Arguments**

* `expr` — An expression returning a number. [`Expression`](/reference/data-types/special-data-types/expression)

**Returned value**

Returns the skewness of the given distribution. If `n <= 1` (`n` is the size of the sample), then the function returns `nan`. [`Float64`](/reference/data-types/float)

**Examples**

**Symmetric distribution**

```sql title=Query
SELECT skewSamp(number) FROM numbers(100);
```

```text title=Response
┌─skewSamp(number)─┐
│                0 │
└──────────────────┘
```

**Right-skewed distribution**

```sql title=Query
SELECT skewSamp(x) FROM (SELECT pow(number, 2) AS x FROM numbers(10));
```

```text title=Response
┌────────skewSamp(x)─┐
│ 0.5751042382747413 │
└────────────────────┘
```

*Introduced in version 20.1.0.*
