Skip to main content

SKEWNESS

Aggregate function.

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

Syntax

SKEWNESS(expression)

Arguments

ArgumentsDescription
expressionAny numerical expression

Return Type

Nullable Float64.

Example

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 |