This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new b93a20c1b77 Docs for skew and kurt (#1127)
b93a20c1b77 is described below

commit b93a20c1b774cf17b01ee0589a2333c4a20f8077
Author: zhiqiang <seuhezhiqi...@163.com>
AuthorDate: Thu Sep 26 20:07:19 2024 +0800

    Docs for skew and kurt (#1127)
    
    # Versions
    
    - [x] dev
    - [x] 3.0
    - [ ] 2.1
    - [ ] 2.0
    
    # Languages
    
    - [x] Chinese
    - [x] English
    
    
    ref https://github.com/apache/doris/pull/40945
---
 .../sql-functions/aggregate-functions/kurt.md      | 79 ++++++++++++++++++++
 .../sql-functions/aggregate-functions/skew.md      | 84 ++++++++++++++++++++++
 .../sql-functions/aggregate-functions/kurt.md      | 78 ++++++++++++++++++++
 .../sql-functions/aggregate-functions/skew.md      | 84 ++++++++++++++++++++++
 .../sql-functions/aggregate-functions/kurt.md      | 78 ++++++++++++++++++++
 .../sql-functions/aggregate-functions/skew.md      | 84 ++++++++++++++++++++++
 sidebars.json                                      |  4 +-
 .../sql-functions/aggregate-functions/kurt.md      | 79 ++++++++++++++++++++
 .../sql-functions/aggregate-functions/skew.md      | 84 ++++++++++++++++++++++
 versioned_sidebars/version-3.0-sidebars.json       |  4 +-
 10 files changed, 656 insertions(+), 2 deletions(-)

diff --git a/docs/sql-manual/sql-functions/aggregate-functions/kurt.md 
b/docs/sql-manual/sql-functions/aggregate-functions/kurt.md
new file mode 100644
index 00000000000..430118be260
--- /dev/null
+++ b/docs/sql-manual/sql-functions/aggregate-functions/kurt.md
@@ -0,0 +1,79 @@
+---
+{
+    "title": "KURT,KURT_POP,KURTOSIS",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## Description
+
+Returns the [kurtosis](https://en.wikipedia.org/wiki/Kurtosis) of the expr 
expression.
+The forumula used for this function is `4-th centrol moment / ((variance)^2) - 
3`, when variance is zero, `kurtosis` will return `NULL`.
+
+## Syntax
+
+`kurtosis(expr)`
+
+## Arguments
+
+TinyInt/SmallInt/Integer/BigInt/Float/Double, Decimal will be casted to a 
float number.
+
+## Return value
+
+`Double`
+
+## Example
+```sql
+create table statistic_test(tag int, val1 double not null, val2 double null) 
distributed by hash(tag) properties("replication_num"="1")
+
+insert into statistic_test values (1, -10, -10),(2, -20, NULL),(3, 100, 
NULL),(4, 100, NULL),(5, 1000,1000);
+
+// NULL is ignored
+select kurt(val1), kurt(val2) from statistic_test
+--------------
+
++-------------------+--------------------+
+| kurt(val1)        | kurt(val2)         |
++-------------------+--------------------+
+| 0.162124583734851 | -1.3330994719286338 |
++-------------------+--------------------+
+1 row in set (0.02 sec)
+
+// Each group just has one row, result is NULL
+select kurt(val1), kurt(val2) from statistic_test group by tag
+--------------
+
++------------+------------+
+| kurt(val1) | kurt(val2) |
++------------+------------+
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
++------------+------------+
+5 rows in set (0.02 sec)
+```
+
+## Related Commands
+
+[skew](./skew.md)
\ No newline at end of file
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/skew.md 
b/docs/sql-manual/sql-functions/aggregate-functions/skew.md
new file mode 100644
index 00000000000..7185ca7f002
--- /dev/null
+++ b/docs/sql-manual/sql-functions/aggregate-functions/skew.md
@@ -0,0 +1,84 @@
+---
+{
+    "title": "SKEW,SKEW_POP,SKEWNESS",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## skewness,skew,skew_pop
+### Description
+
+Returns the [skewness](https://en.wikipedia.org/wiki/Skewness) of the expr 
expression.
+The forumula used for this function is `3-th centrol moment / 
((variance)^{1.5})`, when variance is zero, `skewness` will return `NULL`.
+
+### Syntax
+
+`skewness(expr)`
+
+### Arguments
+
+TinyInt/SmallInt/Integer/BigInt/Float/Double, Decimal will be casted to a 
float number.
+
+### Return value
+
+`Double`
+
+### Example
+```sql
+create table statistic_test (tag int, val1 double not null, val2 double null)
+                distributed by hash(tag) properties("replication_num"="1")
+
+insert into statistic_test values (1, -10, -10),
+                                  (2, -20, NULL),
+                                  (3, 100, NULL),
+                                  (4, 100, NULL),
+                                  (5, 1000,1000);
+
+// NULL is ignored
+select skew(val1), skew(val2) from statistic_test
+--------------
+
++--------------------+--------------------+
+| skew(val1)         | skew(val2)         |
++--------------------+--------------------+
+| 1.4337199628825619 | 1.1543940205711711 |
++--------------------+--------------------+
+1 row in set (0.01 sec)
+
+// Each group just has one row, result is NULL
+select skew(val1), skew(val2) from statistic_test group by tag
+--------------
+
++------------+------------+
+| skew(val1) | skew(val2) |
++------------+------------+
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
++------------+------------+
+5 rows in set (0.04 sec)
+```
+### Related Commands
+
+[kurt](./kurt.md)
\ No newline at end of file
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/kurt.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/kurt.md
new file mode 100644
index 00000000000..ed4aad61341
--- /dev/null
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/kurt.md
@@ -0,0 +1,78 @@
+---
+{
+    "title": "KURT,KURT_POP,KURTOSIS",
+    "language": "zh-CN"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## 描述
+
+kurtosis 返回 expr 表达式的[峰度值](https://en.wikipedia.org/wiki/Kurtosis)。此函数使用的公式为 
第四阶中心矩 / (方差的平方) - 3,当方差为零时,kurtosis 将返回 NULL。
+
+## 语法
+
+`kurtosis(expr)`
+
+## 参数说明
+
+TinyInt/SmallInt/Integer/BigInt/Float/Double, Decimal 会被 cast 成浮点数参与运算。
+
+## 返回值说明
+
+`Double`
+
+## 举例
+```sql
+create table statistic_test(tag int, val1 double not null, val2 double null) 
distributed by hash(tag) properties("replication_num"="1");
+
+insert into statistic_test values (1, -10, -10),(2, -20, NULL),(3, 100, 
NULL),(4, 100, NULL),(5, 1000,1000);
+
+// NULL 值会被忽略
+select kurt(val1), kurt(val2) from statistic_test;
+--------------
+
++-------------------+--------------------+
+| kurt(val1)        | kurt(val2)         |
++-------------------+--------------------+
+| 0.162124583734851 | -1.3330994719286338 |
++-------------------+--------------------+
+1 row in set (0.02 sec)
+
+// 每组只有一行数据,结果为 NULL
+select kurt(val1), kurt(val2) from statistic_test group by tag;
+--------------
+
++------------+------------+
+| kurt(val1) | kurt(val2) |
++------------+------------+
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
++------------+------------+
+5 rows in set (0.02 sec)
+```
+
+## 相关命令
+
+[skew](./skew.md)
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/skew.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/skew.md
new file mode 100644
index 00000000000..2328228628c
--- /dev/null
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/skew.md
@@ -0,0 +1,84 @@
+---
+{
+    "title": "SKEW,SKEW_POP,SKEWNESS",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## skewness,skew,skew_pop
+### 描述
+
+返回表达式的 [斜度](https://en.wikipedia.org/wiki/Skewness)。
+用来计算斜度的公式是 `3阶中心矩 / ((方差)^{1.5})`, 当方差为零时, `skewness` 会返回 `NULL`.
+
+### 语法
+
+`skewness(expr)`
+
+### 参数说明
+
+TinyInt/SmallInt/Integer/BigInt/Float/Double, Decimal 会被 cast 成浮点数参与运算。
+
+### 返回值说明
+
+`Double`
+
+### 举例
+```sql
+create table statistic_test (tag int, val1 double not null, val2 double null)
+                distributed by hash(tag) properties("replication_num"="1")
+
+insert into statistic_test values (1, -10, -10),
+                                  (2, -20, NULL),
+                                  (3, 100, NULL),
+                                  (4, 100, NULL),
+                                  (5, 1000,1000);
+
+// NULL is ignored
+select skew(val1), skew(val2) from statistic_test
+--------------
+
++--------------------+--------------------+
+| skew(val1)         | skew(val2)         |
++--------------------+--------------------+
+| 1.4337199628825619 | 1.1543940205711711 |
++--------------------+--------------------+
+1 row in set (0.01 sec)
+
+// Each group just has one row, result is NULL
+select skew(val1), skew(val2) from statistic_test group by tag
+--------------
+
++------------+------------+
+| skew(val1) | skew(val2) |
++------------+------------+
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
++------------+------------+
+5 rows in set (0.04 sec)
+```
+### 相关命令
+
+[kurt](./kurt.md)
\ No newline at end of file
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/aggregate-functions/kurt.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/aggregate-functions/kurt.md
new file mode 100644
index 00000000000..ed4aad61341
--- /dev/null
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/aggregate-functions/kurt.md
@@ -0,0 +1,78 @@
+---
+{
+    "title": "KURT,KURT_POP,KURTOSIS",
+    "language": "zh-CN"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## 描述
+
+kurtosis 返回 expr 表达式的[峰度值](https://en.wikipedia.org/wiki/Kurtosis)。此函数使用的公式为 
第四阶中心矩 / (方差的平方) - 3,当方差为零时,kurtosis 将返回 NULL。
+
+## 语法
+
+`kurtosis(expr)`
+
+## 参数说明
+
+TinyInt/SmallInt/Integer/BigInt/Float/Double, Decimal 会被 cast 成浮点数参与运算。
+
+## 返回值说明
+
+`Double`
+
+## 举例
+```sql
+create table statistic_test(tag int, val1 double not null, val2 double null) 
distributed by hash(tag) properties("replication_num"="1");
+
+insert into statistic_test values (1, -10, -10),(2, -20, NULL),(3, 100, 
NULL),(4, 100, NULL),(5, 1000,1000);
+
+// NULL 值会被忽略
+select kurt(val1), kurt(val2) from statistic_test;
+--------------
+
++-------------------+--------------------+
+| kurt(val1)        | kurt(val2)         |
++-------------------+--------------------+
+| 0.162124583734851 | -1.3330994719286338 |
++-------------------+--------------------+
+1 row in set (0.02 sec)
+
+// 每组只有一行数据,结果为 NULL
+select kurt(val1), kurt(val2) from statistic_test group by tag;
+--------------
+
++------------+------------+
+| kurt(val1) | kurt(val2) |
++------------+------------+
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
++------------+------------+
+5 rows in set (0.02 sec)
+```
+
+## 相关命令
+
+[skew](./skew.md)
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/aggregate-functions/skew.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/aggregate-functions/skew.md
new file mode 100644
index 00000000000..2328228628c
--- /dev/null
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/aggregate-functions/skew.md
@@ -0,0 +1,84 @@
+---
+{
+    "title": "SKEW,SKEW_POP,SKEWNESS",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## skewness,skew,skew_pop
+### 描述
+
+返回表达式的 [斜度](https://en.wikipedia.org/wiki/Skewness)。
+用来计算斜度的公式是 `3阶中心矩 / ((方差)^{1.5})`, 当方差为零时, `skewness` 会返回 `NULL`.
+
+### 语法
+
+`skewness(expr)`
+
+### 参数说明
+
+TinyInt/SmallInt/Integer/BigInt/Float/Double, Decimal 会被 cast 成浮点数参与运算。
+
+### 返回值说明
+
+`Double`
+
+### 举例
+```sql
+create table statistic_test (tag int, val1 double not null, val2 double null)
+                distributed by hash(tag) properties("replication_num"="1")
+
+insert into statistic_test values (1, -10, -10),
+                                  (2, -20, NULL),
+                                  (3, 100, NULL),
+                                  (4, 100, NULL),
+                                  (5, 1000,1000);
+
+// NULL is ignored
+select skew(val1), skew(val2) from statistic_test
+--------------
+
++--------------------+--------------------+
+| skew(val1)         | skew(val2)         |
++--------------------+--------------------+
+| 1.4337199628825619 | 1.1543940205711711 |
++--------------------+--------------------+
+1 row in set (0.01 sec)
+
+// Each group just has one row, result is NULL
+select skew(val1), skew(val2) from statistic_test group by tag
+--------------
+
++------------+------------+
+| skew(val1) | skew(val2) |
++------------+------------+
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
++------------+------------+
+5 rows in set (0.04 sec)
+```
+### 相关命令
+
+[kurt](./kurt.md)
\ No newline at end of file
diff --git a/sidebars.json b/sidebars.json
index 2fdd156a83b..4f7831a16a0 100644
--- a/sidebars.json
+++ b/sidebars.json
@@ -1012,7 +1012,9 @@
                                 
"sql-manual/sql-functions/aggregate-functions/regr_sxy",
                                 
"sql-manual/sql-functions/aggregate-functions/regr_syy",
                                 
"sql-manual/sql-functions/aggregate-functions/sequence-match",
-                                
"sql-manual/sql-functions/aggregate-functions/sequence-count"
+                                
"sql-manual/sql-functions/aggregate-functions/sequence-count",
+                                
"sql-manual/sql-functions/aggregate-functions/kurt",
+                                
"sql-manual/sql-functions/aggregate-functions/skew"
                             ]
                         },
                         {
diff --git 
a/versioned_docs/version-3.0/sql-manual/sql-functions/aggregate-functions/kurt.md
 
b/versioned_docs/version-3.0/sql-manual/sql-functions/aggregate-functions/kurt.md
new file mode 100644
index 00000000000..430118be260
--- /dev/null
+++ 
b/versioned_docs/version-3.0/sql-manual/sql-functions/aggregate-functions/kurt.md
@@ -0,0 +1,79 @@
+---
+{
+    "title": "KURT,KURT_POP,KURTOSIS",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## Description
+
+Returns the [kurtosis](https://en.wikipedia.org/wiki/Kurtosis) of the expr 
expression.
+The forumula used for this function is `4-th centrol moment / ((variance)^2) - 
3`, when variance is zero, `kurtosis` will return `NULL`.
+
+## Syntax
+
+`kurtosis(expr)`
+
+## Arguments
+
+TinyInt/SmallInt/Integer/BigInt/Float/Double, Decimal will be casted to a 
float number.
+
+## Return value
+
+`Double`
+
+## Example
+```sql
+create table statistic_test(tag int, val1 double not null, val2 double null) 
distributed by hash(tag) properties("replication_num"="1")
+
+insert into statistic_test values (1, -10, -10),(2, -20, NULL),(3, 100, 
NULL),(4, 100, NULL),(5, 1000,1000);
+
+// NULL is ignored
+select kurt(val1), kurt(val2) from statistic_test
+--------------
+
++-------------------+--------------------+
+| kurt(val1)        | kurt(val2)         |
++-------------------+--------------------+
+| 0.162124583734851 | -1.3330994719286338 |
++-------------------+--------------------+
+1 row in set (0.02 sec)
+
+// Each group just has one row, result is NULL
+select kurt(val1), kurt(val2) from statistic_test group by tag
+--------------
+
++------------+------------+
+| kurt(val1) | kurt(val2) |
++------------+------------+
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
++------------+------------+
+5 rows in set (0.02 sec)
+```
+
+## Related Commands
+
+[skew](./skew.md)
\ No newline at end of file
diff --git 
a/versioned_docs/version-3.0/sql-manual/sql-functions/aggregate-functions/skew.md
 
b/versioned_docs/version-3.0/sql-manual/sql-functions/aggregate-functions/skew.md
new file mode 100644
index 00000000000..7185ca7f002
--- /dev/null
+++ 
b/versioned_docs/version-3.0/sql-manual/sql-functions/aggregate-functions/skew.md
@@ -0,0 +1,84 @@
+---
+{
+    "title": "SKEW,SKEW_POP,SKEWNESS",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## skewness,skew,skew_pop
+### Description
+
+Returns the [skewness](https://en.wikipedia.org/wiki/Skewness) of the expr 
expression.
+The forumula used for this function is `3-th centrol moment / 
((variance)^{1.5})`, when variance is zero, `skewness` will return `NULL`.
+
+### Syntax
+
+`skewness(expr)`
+
+### Arguments
+
+TinyInt/SmallInt/Integer/BigInt/Float/Double, Decimal will be casted to a 
float number.
+
+### Return value
+
+`Double`
+
+### Example
+```sql
+create table statistic_test (tag int, val1 double not null, val2 double null)
+                distributed by hash(tag) properties("replication_num"="1")
+
+insert into statistic_test values (1, -10, -10),
+                                  (2, -20, NULL),
+                                  (3, 100, NULL),
+                                  (4, 100, NULL),
+                                  (5, 1000,1000);
+
+// NULL is ignored
+select skew(val1), skew(val2) from statistic_test
+--------------
+
++--------------------+--------------------+
+| skew(val1)         | skew(val2)         |
++--------------------+--------------------+
+| 1.4337199628825619 | 1.1543940205711711 |
++--------------------+--------------------+
+1 row in set (0.01 sec)
+
+// Each group just has one row, result is NULL
+select skew(val1), skew(val2) from statistic_test group by tag
+--------------
+
++------------+------------+
+| skew(val1) | skew(val2) |
++------------+------------+
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
+|       NULL |       NULL |
++------------+------------+
+5 rows in set (0.04 sec)
+```
+### Related Commands
+
+[kurt](./kurt.md)
\ No newline at end of file
diff --git a/versioned_sidebars/version-3.0-sidebars.json 
b/versioned_sidebars/version-3.0-sidebars.json
index ee9eec50af5..f82c6e85055 100644
--- a/versioned_sidebars/version-3.0-sidebars.json
+++ b/versioned_sidebars/version-3.0-sidebars.json
@@ -1002,7 +1002,9 @@
                                 
"sql-manual/sql-functions/aggregate-functions/regr_sxy",
                                 
"sql-manual/sql-functions/aggregate-functions/regr_syy",
                                 
"sql-manual/sql-functions/aggregate-functions/sequence-match",
-                                
"sql-manual/sql-functions/aggregate-functions/sequence-count"
+                                
"sql-manual/sql-functions/aggregate-functions/sequence-count",
+                                
"sql-manual/sql-functions/aggregate-functions/kurt",
+                                
"sql-manual/sql-functions/aggregate-functions/skew"
                             ]
                         },
                         {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to