KURTOSIS (Lakehouse v1)
Aggregate function.
The KURTOSIS() function returns the excess kurtosis of all input values.
Analyze Syntax
Section titled “Analyze Syntax”func.kurtosis(<expr>)Analyze Examples
Section titled “Analyze Examples”func.kurtosis(table.price).alias('excess_kurtosis')
| excess_kurtosis ||-------------------------|| 0.06818181325581445 |SQL Syntax
Section titled “SQL Syntax”KURTOSIS(<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 stock_prices ( id INT, stock_symbol VARCHAR, price FLOAT);
INSERT INTO stock_prices (id, stock_symbol, price)VALUES (1, 'AAPL', 150), (2, 'AAPL', 152), (3, 'AAPL', 148), (4, 'AAPL', 160), (5, 'AAPL', 155);Query Demo: Calculate Excess Kurtosis for Apple Stock Prices
SELECT KURTOSIS(price) AS excess_kurtosisFROM stock_pricesWHERE stock_symbol = 'AAPL';Result
| excess_kurtosis ||-------------------------|| 0.06818181325581445 |