Skip to content

Aggregate function.

The SKEWNESS() function returns the skewness of all input values.

func.skewness(<expr>)
func.skewness(table.temperature).alias('temperature_skewness')
| temperature_skewness |
|----------------------|
| 0.68 |
SKEWNESS(<expr>)
ArgumentsDescription
<expr>Any numerical expression

Nullable Float64.

Create a Table and Insert Sample Data

CREATE TABLE temperature_data (
id INT,
city_id INT,
temperature FLOAT
);
INSERT INTO temperature_data (id, city_id, temperature)
VALUES (1, 1, 60),
(2, 1, 65),
(3, 1, 62),
(4, 2, 70),
(5, 2, 75);

Query Demo: Calculate Skewness of Temperature Data

SELECT SKEWNESS(temperature) AS temperature_skewness
FROM temperature_data;

Result

| temperature_skewness |
|----------------------|
| 0.68 |