SKEWNESS (Lakehouse v1)
Aggregate function.
The SKEWNESS() function returns the skewness of all input values.
Analyze Syntax
Section titled “Analyze Syntax”func.skewness(<expr>)Analyze Examples
Section titled “Analyze Examples”func.skewness(table.temperature).alias('temperature_skewness')
| temperature_skewness ||----------------------|| 0.68 |SQL Syntax
Section titled “SQL Syntax”SKEWNESS(<expr>)Arguments
Section titled “Arguments”| Arguments | Description |
|---|---|
<expr> | Any numerical expression |
Return Type
Section titled “Return Type”Nullable Float64.
SQL Examples
Section titled “SQL Examples”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_skewnessFROM temperature_data;Result
| temperature_skewness ||----------------------|| 0.68 |