SKEWNESS
集計関数。
SKEWNESS() 関数は、すべての入力値の歪度を返します。
構文
SKEWNESS(<expr>)
引数
戻り値の型
NULL 可能な Float64。
例
テーブルを作成してサンプルデータを挿入する
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);
クエリ例: 温度データの歪度を計算する
SELECT SKEWNESS(temperature) AS temperature_skewness
FROM temperature_data;
結果
| temperature_skewness |
|----------------------|
| 0.68 |