Zum Inhalt springen

Aggregatfunktion.

Die Funktion KURTOSIS() gibt die Exzess-Kurtosis aller Eingabewerte zurück.

func.kurtosis(<expr>)
func.kurtosis(table.price).alias('excess_kurtosis')
| excess_kurtosis |
|-------------------------|
| 0.06818181325581445 |
KURTOSIS(<expr>)
Argumente Beschreibung
<expr> Beliebiger numerischer Ausdruck

Nullable Float64.

Tabelle erstellen und Beispieldaten einfügen

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);

Abfragedemo: Exzess-Kurtosis für Apple-Aktienkurse berechnen

SELECT KURTOSIS(price) AS excess_kurtosis
FROM stock_prices
WHERE stock_symbol = 'AAPL';

Ergebnis

| excess_kurtosis |
|-------------------------|
| 0.06818181325581445 |