You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by zc...@apache.org on 2026/04/14 04:01:08 UTC

(doris-website) branch master updated: [docs](function) add REGR aggregate function docs for current and 4.x (#3544)

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

zclll 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 1ff4d05aa45 [docs](function) add REGR aggregate function docs for current and 4.x (#3544)
1ff4d05aa45 is described below

commit 1ff4d05aa45a478c24bc7a9ed4965344cc0c0803
Author: Jover <jo...@gmail.com>
AuthorDate: Tue Apr 14 12:01:01 2026 +0800

    [docs](function) add REGR aggregate function docs for current and 4.x (#3544)
    
    ## Versions
    
    Add REGR aggregate function docs for
    https://github.com/apache/doris/pull/61352
    
    - [x] dev
    - [x] 4.x
    - [ ] 3.x
    - [ ] 2.1
    
    ## Languages
    
    - [x] Chinese
    - [x] English
    
    ## Docs Checklist
    
    - [x] Checked by AI
    - [ ] Test Cases Built
---
 .../sql-functions/aggregate-functions/regr-avgx.md | 64 ++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-avgy.md | 64 ++++++++++++++++++
 .../aggregate-functions/regr-count.md              | 66 ++++++++++++++++++
 .../aggregate-functions/regr-intercept.md          | 60 ++++++----------
 .../sql-functions/aggregate-functions/regr-r2.md   | 75 ++++++++++++++++++++
 .../aggregate-functions/regr-slope.md              | 56 ++++++---------
 .../sql-functions/aggregate-functions/regr-sxx.md  | 64 ++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-sxy.md  | 64 ++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-syy.md  | 64 ++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-avgx.md | 64 ++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-avgy.md | 64 ++++++++++++++++++
 .../aggregate-functions/regr-count.md              | 66 ++++++++++++++++++
 .../aggregate-functions/regr-intercept.md          | 58 ++++++----------
 .../sql-functions/aggregate-functions/regr-r2.md   | 75 ++++++++++++++++++++
 .../aggregate-functions/regr-slope.md              | 55 ++++++---------
 .../sql-functions/aggregate-functions/regr-sxx.md  | 64 ++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-sxy.md  | 64 ++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-syy.md  | 64 ++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-avgx.md | 68 +++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-avgy.md | 68 +++++++++++++++++++
 .../aggregate-functions/regr-count.md              | 70 +++++++++++++++++++
 .../aggregate-functions/regr-intercept.md          | 58 ++++++----------
 .../sql-functions/aggregate-functions/regr-r2.md   | 79 ++++++++++++++++++++++
 .../aggregate-functions/regr-slope.md              | 55 ++++++---------
 .../sql-functions/aggregate-functions/regr-sxx.md  | 68 +++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-sxy.md  | 68 +++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-syy.md  | 68 +++++++++++++++++++
 sidebars.ts                                        | 14 ++++
 .../sql-functions/aggregate-functions/regr-avgx.md | 68 +++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-avgy.md | 68 +++++++++++++++++++
 .../aggregate-functions/regr-count.md              | 70 +++++++++++++++++++
 .../aggregate-functions/regr-intercept.md          | 60 ++++++----------
 .../sql-functions/aggregate-functions/regr-r2.md   | 79 ++++++++++++++++++++++
 .../aggregate-functions/regr-slope.md              | 56 ++++++---------
 .../sql-functions/aggregate-functions/regr-sxx.md  | 68 +++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-sxy.md  | 68 +++++++++++++++++++
 .../sql-functions/aggregate-functions/regr-syy.md  | 68 +++++++++++++++++++
 versioned_sidebars/version-4.x-sidebars.json       | 14 ++++
 38 files changed, 2086 insertions(+), 300 deletions(-)

diff --git a/docs/sql-manual/sql-functions/aggregate-functions/regr-avgx.md b/docs/sql-manual/sql-functions/aggregate-functions/regr-avgx.md
new file mode 100644
index 00000000000..0ce5e901f5b
--- /dev/null
+++ b/docs/sql-manual/sql-functions/aggregate-functions/regr-avgx.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "REGR_AVGX",
+    "language": "en",
+    "description": "Returns the average of the independent variable (x) for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the average of the independent variable `x` over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable.
+
+## Syntax
+
+```sql
+REGR_AVGX(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the average of `x` for non-null `(y, x)` pairs.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_AVGX(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+--------------------+
+| id   | REGR_AVGX(y, x)    |
++------+--------------------+
+|    1 |               NULL |
+|    2 |                2.5 |
++------+--------------------+
+```
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/regr-avgy.md b/docs/sql-manual/sql-functions/aggregate-functions/regr-avgy.md
new file mode 100644
index 00000000000..f4210b443b6
--- /dev/null
+++ b/docs/sql-manual/sql-functions/aggregate-functions/regr-avgy.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "REGR_AVGY",
+    "language": "en",
+    "description": "Returns the average of the dependent variable (y) for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the average of the dependent variable `y` over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable.
+
+## Syntax
+
+```sql
+REGR_AVGY(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the average of `y` for non-null `(y, x)` pairs.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_AVGY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+------------------+
+| id   | REGR_AVGY(y, x)  |
++------+------------------+
+|    1 |             NULL |
+|    2 |              6.0 |
++------+------------------+
+```
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/regr-count.md b/docs/sql-manual/sql-functions/aggregate-functions/regr-count.md
new file mode 100644
index 00000000000..5552d406270
--- /dev/null
+++ b/docs/sql-manual/sql-functions/aggregate-functions/regr-count.md
@@ -0,0 +1,66 @@
+---
+{
+    "title": "REGR_COUNT",
+    "language": "en",
+    "description": "Returns the number of non-null (y, x) pairs in a group."
+}
+---
+
+## Description
+
+Returns the number of non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. If there are no valid non-null pairs, the function returns `0`.
+
+## Syntax
+
+```sql
+REGR_COUNT(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a BIGINT value representing the number of non-null `(y, x)` pairs.
+If there are no rows in the group, or there are no valid non-null `(y, x)` pairs, the function returns `0`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_COUNT(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+-------------------+
+| id   | REGR_COUNT(y, x)  |
++------+-------------------+
+|    1 |                 0 |
+|    2 |                 4 |
++------+-------------------+
+```
+
+REGR_COUNT counts only non-null `(y, x)` pairs, so group 1 returns `0`.
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/regr-intercept.md b/docs/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
index 900de4f7d28..30edfa1df57 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
@@ -2,17 +2,13 @@
 {
     "title": "REGR_INTERCEPT",
     "language": "en",
-    "description": "Returns the intercept of the univariate linear regression line for non-null pairs in a group."
+    "description": "Returns the intercept of the linear regression line for non-null pairs in a group."
 }
 ---
 
 ## Description
 
-Returns the intercept of the univariate linear regression line for non-null pairs in a group. It is computed for non-null pairs using the following formula:
-
-`AVG(y) - REGR_SLOPE(y, x) * AVG(x)`
-
-Where `x` is the independent variable and y is the dependent variable.
+Returns the intercept of the linear regression line computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. It is equivalent to `AVG(y) - REGR_SLOPE(y, x) * AVG(x)`.
 
 ## Syntax
 
@@ -29,52 +25,40 @@ REGR_INTERCEPT(<y>, <x>)
 
 ## Return Value
 
-Returns a Double value representing the intercept of the univariate linear regression line for non-null pairs in a group. If there are no rows, or only rows that contain nulls, the function returns NULL.
+Returns a Double value representing the intercept of the linear regression line.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
 
-## Examples
+## Example
 
 ```sql
--- Create sample table
-CREATE TABLE test_regr_intercept (
+CREATE TABLE test_regr (
   `id` int,
-  `x` int,
-  `y` int
+  `x` double,
+  `y` double
 ) DUPLICATE KEY (`id`)
 DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
 PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
 );
 
--- Insert sample data
-INSERT INTO test_regr_intercept VALUES
-(1, 18, 13),
-(2, 14, 27),
-(3, 12, 2),
-(4, 5, 6),
-(5, 10, 20);
-
--- Calculate the linear regression intercept of x and y
-SELECT REGR_INTERCEPT(y, x) FROM test_regr_intercept;
-```
-
-```text
-+----------------------+
-| REGR_INTERCEPT(y, x) |
-+----------------------+
-|    5.512931034482759 |
-+----------------------+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
 ```
 
 ```sql
-SELECT REGR_INTERCEPT(y, x) FROM test_regr_intercept where x>100;
+SELECT id, REGR_INTERCEPT(y, x) FROM test_regr GROUP BY id ORDER BY id;
 ```
 
-When there are no rows in the group, the function returns `NULL`.
-
 ```text
-+----------------------+
-| REGR_INTERCEPT(y, x) |
-+----------------------+
-|                 NULL |
-+----------------------+
++------+------------------------+
+| id   | REGR_INTERCEPT(y, x)   |
++------+------------------------+
+|    1 |                   NULL |
+|    2 |                    1.0 |
++------+------------------------+
 ```
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/regr-r2.md b/docs/sql-manual/sql-functions/aggregate-functions/regr-r2.md
new file mode 100644
index 00000000000..1d32c35edf3
--- /dev/null
+++ b/docs/sql-manual/sql-functions/aggregate-functions/regr-r2.md
@@ -0,0 +1,75 @@
+---
+{
+    "title": "REGR_R2",
+    "language": "en",
+    "description": "Returns the coefficient of determination of the linear regression for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the coefficient of determination of the linear regression computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable.
+
+## Syntax
+
+```sql
+REGR_R2(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the coefficient of determination (R-squared).
+- If `REGR_COUNT(y, x) < 1`, the function returns `NULL`.
+- If `VAR_POP(x) = 0`, the function returns `NULL`.
+- If `VAR_POP(y) = 0`, the function returns `1`.
+- Otherwise, the function returns `POWER(CORR(y, x), 2)`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL),
+(3, 1, 5),
+(3, 1, 7),
+(4, 1, 5),
+(4, 2, 5);
+```
+
+```sql
+SELECT id, REGR_R2(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+---------------------+
+| id   | REGR_R2(y, x)       |
++------+---------------------+
+|    1 |                NULL |
+|    2 |                 1.0 |
+|    3 |                NULL |
+|    4 |                 1.0 |
++------+---------------------+
+```
+
+Group 3 shows the `VAR_POP(x) = 0` case, so the result is `NULL`, and group 4 shows the `VAR_POP(y) = 0` case, so the result is `1.0`.
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/regr-slope.md b/docs/sql-manual/sql-functions/aggregate-functions/regr-slope.md
index 87f50fe7def..a9d0c648193 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/regr-slope.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/regr-slope.md
@@ -8,8 +8,7 @@
 
 ## Description
 
-Returns the slope of the linear regression line for non-null pairs in a group.
-
+Returns the slope of the linear regression line computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. It is equivalent to `COVAR_POP(y, x) / VAR_POP(x)`.
 
 ## Syntax
 
@@ -29,54 +28,37 @@ REGR_SLOPE(<y>, <x>)
 Returns a Double value representing the slope of the linear regression line.
 If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
 
-## Examples
+## Example
 
 ```sql
--- setup
-CREATE TABLE test_regr_slope (
+CREATE TABLE test_regr (
   `id` int,
-  `x` int,
-  `y` int
+  `x` double,
+  `y` double
 ) DUPLICATE KEY (`id`)
 DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
 PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
 );
 
--- Insert example data
-INSERT INTO test_regr_slope VALUES
-(1, 18, 13),
-(2, 14, 27),
-(3, 12, 2),
-(4, 5, 6),
-(5, 10, 20);
-```
-
-```sql
-SELECT REGR_SLOPE(y, x) FROM test_regr_slope;
-```
-
-Calculate the linear regression slope of x and y.
-
-
-```text
-+--------------------+
-| REGR_SLOPE(y, x)   |
-+--------------------+
-| 0.6853448275862069 |
-+--------------------+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
 ```
 
 ```sql
-SELECT REGR_SLOPE(y, x) FROM test_regr_slope where x>100;
+SELECT id, REGR_SLOPE(y, x) FROM test_regr GROUP BY id ORDER BY id;
 ```
 
-When there are no rows in the group, the function returns `NULL`.
-
 ```text
-+------------------+
-| REGR_SLOPE(y, x) |
-+------------------+
-|             NULL |
-+------------------+
++------+--------------------+
+| id   | REGR_SLOPE(y, x)   |
++------+--------------------+
+|    1 |               NULL |
+|    2 |                2.0 |
++------+--------------------+
 ```
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/regr-sxx.md b/docs/sql-manual/sql-functions/aggregate-functions/regr-sxx.md
new file mode 100644
index 00000000000..4bef6782148
--- /dev/null
+++ b/docs/sql-manual/sql-functions/aggregate-functions/regr-sxx.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "REGR_SXX",
+    "language": "en",
+    "description": "Returns the sum of squares of the independent variable (x) for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the sum of squared deviations of the independent variable `x` from its mean, computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. It is equivalent to `REGR_COUNT(y, x) * VAR_POP(x)`.
+
+## Syntax
+
+```sql
+REGR_SXX(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the sum of squared deviations of `x` from its mean.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SXX(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+--------------------+
+| id   | REGR_SXX(y, x)     |
++------+--------------------+
+|    1 |               NULL |
+|    2 |                5.0 |
++------+--------------------+
+```
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/regr-sxy.md b/docs/sql-manual/sql-functions/aggregate-functions/regr-sxy.md
new file mode 100644
index 00000000000..13b7dca7e72
--- /dev/null
+++ b/docs/sql-manual/sql-functions/aggregate-functions/regr-sxy.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "REGR_SXY",
+    "language": "en",
+    "description": "Returns the sum of products of the independent variable (x) and the dependent variable (y) for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the sum of the products of the deviations of `x` and `y` from their respective means, computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. It is equivalent to `REGR_COUNT(y, x) * COVAR_POP(y, x)`.
+
+## Syntax
+
+```sql
+REGR_SXY(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the sum of the products of the deviations of `x` and `y` from their respective means.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SXY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+-----------------+
+| id   | REGR_SXY(y, x)  |
++------+-----------------+
+|    1 |            NULL |
+|    2 |            10.0 |
++------+-----------------+
+```
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/regr-syy.md b/docs/sql-manual/sql-functions/aggregate-functions/regr-syy.md
new file mode 100644
index 00000000000..97bc3c8e515
--- /dev/null
+++ b/docs/sql-manual/sql-functions/aggregate-functions/regr-syy.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "REGR_SYY",
+    "language": "en",
+    "description": "Returns the sum of squares of the dependent variable (y) for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the sum of squared deviations of the dependent variable `y` from its mean, computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. It is equivalent to `REGR_COUNT(y, x) * VAR_POP(y)`.
+
+## Syntax
+
+```sql
+REGR_SYY(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the sum of squared deviations of `y` from its mean.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SYY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+-----------------+
+| id   | REGR_SYY(y, x)  |
++------+-----------------+
+|    1 |            NULL |
+|    2 |            20.0 |
++------+-----------------+
+```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-avgx.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-avgx.md
new file mode 100644
index 00000000000..1e0e3531956
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-avgx.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "REGR_AVGX",
+    "language": "zh-CN",
+    "description": "REGRAVGX 函数用于返回组内非空值对中自变量 (x) 的平均值。"
+}
+---
+
+## 描述
+
+返回组内非空 `(y, x)` 值对中自变量 `x` 的平均值,其中 `x` 为自变量,`y` 为因变量。
+
+## 语法
+
+```sql
+REGR_AVGX(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示非空 `(y, x)` 值对中 `x` 的平均值。
+如果没有行,或者只有包含空值的行,函数返回 `NULL`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_AVGX(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+---------------------+
+| id   | REGR_AVGX(y, x)     |
++------+---------------------+
+|    1 |                NULL |
+|    2 |                 2.5 |
++------+---------------------+
+```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-avgy.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-avgy.md
new file mode 100644
index 00000000000..b6eb45640e7
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-avgy.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "REGR_AVGY",
+    "language": "zh-CN",
+    "description": "REGRAVGY 函数用于返回组内非空值对中因变量 (y) 的平均值。"
+}
+---
+
+## 描述
+
+返回组内非空 `(y, x)` 值对中因变量 `y` 的平均值,其中 `x` 为自变量,`y` 为因变量。
+
+## 语法
+
+```sql
+REGR_AVGY(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示非空 `(y, x)` 值对中 `y` 的平均值。
+如果没有行,或者只有包含空值的行,函数返回 `NULL`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_AVGY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+---------------------+
+| id   | REGR_AVGY(y, x)     |
++------+---------------------+
+|    1 |                NULL |
+|    2 |                 6.0 |
++------+---------------------+
+```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-count.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-count.md
new file mode 100644
index 00000000000..5a2d2399a15
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-count.md
@@ -0,0 +1,66 @@
+---
+{
+    "title": "REGR_COUNT",
+    "language": "zh-CN",
+    "description": "REGRCOUNT 函数用于返回组内非空值对的数量。"
+}
+---
+
+## 描述
+
+返回组内非空 `(y, x)` 值对的数量,其中 `x` 为自变量,`y` 为因变量。如果不存在有效的非空值对,函数返回 `0`。
+
+## 语法
+
+```sql
+REGR_COUNT(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 BIGINT 类型的值,表示非空 `(y, x)` 值对的数量。
+如果组内没有行,或者不存在有效的非空 `(y, x)` 值对,函数返回 `0`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_COUNT(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+---------------------+
+| id   | REGR_COUNT(y, x)    |
++------+---------------------+
+|    1 |                   0 |
+|    2 |                   4 |
++------+---------------------+
+```
+
+REGR_COUNT 仅统计非空 `(y, x)` 值对,因此分组 1 返回 `0`。
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-intercept.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
index 67d03fb5334..f0bd96351db 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
@@ -8,11 +8,7 @@
 
 ## 描述
 
-`REGR_INTERCEPT` 函数用于计算线性回归方程中的截距(y 轴截距)。它返回组内非空值对的单变量线性回归线的截距。对于非空值对,使用以下公式计算:
-
-`AVG(y) - REGR_SLOPE(y, x) * AVG(x)`
-
-其中 `x` 是自变量,`y` 是因变量。
+返回基于组内非空 `(y, x)` 值对计算得到的线性回归线截距,其中 `x` 为自变量,`y` 为因变量。它等价于 `AVG(y) - REGR_SLOPE(y, x) * AVG(x)`。
 
 ## 语法
 
@@ -30,55 +26,39 @@ REGR_INTERCEPT(<y>, <x>)
 ## 返回值
 
 返回 Double 类型的值,表示线性回归线与 `y` 轴的交点。
-如果没有行,或者只有包含空值的行,函数返回 NULL。
+如果组内没有行,或者表达式都为 `NULL`,函数返回 `NULL`。
 
 ## 举例
 
 ```sql
--- setup
-CREATE TABLE test_regr_intercept (
+CREATE TABLE test_regr (
   `id` int,
-  `x` int,
-  `y` int
+  `x` double,
+  `y` double
 ) DUPLICATE KEY (`id`)
 DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
 PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
 );
 
--- 插入示例数据
-INSERT INTO test_regr_intercept VALUES
-(1, 18, 13),
-(2, 14, 27),
-(3, 12, 2),
-(4, 5, 6),
-(5, 10, 20);
-```
-
-```sql
-SELECT REGR_INTERCEPT(y, x) FROM test_regr_intercept;
-```
-
-计算 x 和 y 的线性回归截距。
-
-```text
-+-------------------------+
-| regr_intercept(y, x)    |
-+-------------------------+
-|      5.512931034482759  | 
-+-------------------------+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
 ```
 
 ```sql
-SELECT REGR_INTERCEPT(y, x) FROM test_regr_intercept where x>100;
+SELECT id, REGR_INTERCEPT(y, x) FROM test_regr GROUP BY id ORDER BY id;
 ```
 
-组内没有数据时,返回 NULL 。
-
 ```text
-+----------------------+
-| REGR_INTERCEPT(y, x) |
-+----------------------+
-|                 NULL |
-+----------------------+
++------+------------------------+
+| id   | REGR_INTERCEPT(y, x)   |
++------+------------------------+
+|    1 |                   NULL |
+|    2 |                    1.0 |
++------+------------------------+
 ```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-r2.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-r2.md
new file mode 100644
index 00000000000..b065455b5e7
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-r2.md
@@ -0,0 +1,75 @@
+---
+{
+    "title": "REGR_R2",
+    "language": "zh-CN",
+    "description": "REGRR2 函数用于返回组内非空值对的线性回归决定系数。"
+}
+---
+
+## 描述
+
+返回基于组内非空 `(y, x)` 值对计算得到的线性回归决定系数,其中 `x` 为自变量,`y` 为因变量。
+
+## 语法
+
+```sql
+REGR_R2(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示决定系数(R 平方)。
+- 如果 `REGR_COUNT(y, x) < 1`,函数返回 `NULL`。
+- 如果 `VAR_POP(x) = 0`,函数返回 `NULL`。
+- 如果 `VAR_POP(y) = 0`,函数返回 `1`。
+- 否则,函数返回 `POWER(CORR(y, x), 2)`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL),
+(3, 1, 5),
+(3, 1, 7),
+(4, 1, 5),
+(4, 2, 5);
+```
+
+```sql
+SELECT id, REGR_R2(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+---------------------+
+| id   | REGR_R2(y, x)       |
++------+---------------------+
+|    1 |                NULL |
+|    2 |                 1.0 |
+|    3 |                NULL |
+|    4 |                 1.0 |
++------+---------------------+
+```
+
+分组 3 展示了 `VAR_POP(x) = 0` 的情况,因此结果为 `NULL`;分组 4 展示了 `VAR_POP(y) = 0` 的情况,因此结果为 `1.0`。
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-slope.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-slope.md
index 199f2f19a87..fed49364f0f 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-slope.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-slope.md
@@ -8,8 +8,7 @@
 
 ## 描述
 
-`REGR_SLOPE` 函数用于计算线性回归方程中的斜率。它返回组内非空值对的单变量线性回归线的斜率。
-
+返回基于组内非空 `(y, x)` 值对计算得到的线性回归线斜率,其中 `x` 为自变量,`y` 为因变量。它等价于 `COVAR_POP(y, x) / VAR_POP(x)`。
 
 ## 语法
 
@@ -27,55 +26,39 @@ REGR_SLOPE(<y>, <x>)
 ## 返回值
 
 返回 Double 类型的值,表示线性回归线的斜率。
-如果没有行,或者只有包含空值的行,函数返回 NULL。
+如果组内没有行,或者表达式都为 `NULL`,函数返回 `NULL`。
 
 ## 举例
 
 ```sql
--- setup
-CREATE TABLE test_regr_slope (
+CREATE TABLE test_regr (
   `id` int,
-  `x` int,
-  `y` int
+  `x` double,
+  `y` double
 ) DUPLICATE KEY (`id`)
 DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
 PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
 );
 
--- 插入示例数据
-INSERT INTO test_regr_slope VALUES
-(1, 18, 13),
-(2, 14, 27),
-(3, 12, 2),
-(4, 5, 6),
-(5, 10, 20);
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
 ```
 
 ```sql
-SELECT REGR_SLOPE(y, x) FROM test_regr_slope;
-```
-
-计算 x 和 y 的线性回归截距。
-
-```text
-+--------------------+
-| REGR_SLOPE(y, x)   |
-+--------------------+
-| 0.6853448275862069 |
-+--------------------+
+SELECT id, REGR_SLOPE(y, x) FROM test_regr GROUP BY id ORDER BY id;
 ```
 
-```sql
-SELECT REGR_SLOPE(y, x) FROM test_regr_slope where x>100;
-```
-
-组内没有数据时,返回 NULL 。
-
 ```text
-+------------------+
-| REGR_SLOPE(y, x) |
-+------------------+
-|             NULL |
-+------------------+
++------+---------------------+
+| id   | REGR_SLOPE(y, x)    |
++------+---------------------+
+|    1 |                NULL |
+|    2 |                 2.0 |
++------+---------------------+
 ```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-sxx.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-sxx.md
new file mode 100644
index 00000000000..c7d67e487e8
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-sxx.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "REGR_SXX",
+    "language": "zh-CN",
+    "description": "REGRSXX 函数用于返回组内非空值对中自变量 (x) 的离差平方和。"
+}
+---
+
+## 描述
+
+返回自变量 `x` 相对于其均值的离差平方和,基于组内非空 `(y, x)` 值对计算,其中 `x` 为自变量,`y` 为因变量。它等价于 `REGR_COUNT(y, x) * VAR_POP(x)`。
+
+## 语法
+
+```sql
+REGR_SXX(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示 `x` 相对于其均值的离差平方和。
+如果组内没有行,或者表达式都为 `NULL`,函数返回 `NULL`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SXX(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+---------------------+
+| id   | REGR_SXX(y, x)      |
++------+---------------------+
+|    1 |                NULL |
+|    2 |                 5.0 |
++------+---------------------+
+```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-sxy.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-sxy.md
new file mode 100644
index 00000000000..2f06554b875
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-sxy.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "REGR_SXY",
+    "language": "zh-CN",
+    "description": "REGRSXY 函数用于返回组内非空值对中自变量 (x) 和因变量 (y) 的离差积和。"
+}
+---
+
+## 描述
+
+返回 `x` 和 `y` 分别相对于各自均值的离差乘积之和,基于组内非空 `(y, x)` 值对计算,其中 `x` 为自变量,`y` 为因变量。它等价于 `REGR_COUNT(y, x) * COVAR_POP(y, x)`。
+
+## 语法
+
+```sql
+REGR_SXY(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示 `x` 和 `y` 分别相对于各自均值的离差乘积之和。
+如果组内没有行,或者表达式都为 `NULL`,函数返回 `NULL`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SXY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+---------------------+
+| id   | REGR_SXY(y, x)      |
++------+---------------------+
+|    1 |                NULL |
+|    2 |                10.0 |
++------+---------------------+
+```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-syy.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-syy.md
new file mode 100644
index 00000000000..403ab3cd835
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/regr-syy.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "REGR_SYY",
+    "language": "zh-CN",
+    "description": "REGRSYY 函数用于返回组内非空值对中因变量 (y) 的离差平方和。"
+}
+---
+
+## 描述
+
+返回因变量 `y` 相对于其均值的离差平方和,基于组内非空 `(y, x)` 值对计算,其中 `x` 为自变量,`y` 为因变量。它等价于 `REGR_COUNT(y, x) * VAR_POP(y)`。
+
+## 语法
+
+```sql
+REGR_SYY(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示 `y` 相对于其均值的离差平方和。
+如果组内没有行,或者表达式都为 `NULL`,函数返回 `NULL`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SYY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+---------------------+
+| id   | REGR_SYY(y, x)      |
++------+---------------------+
+|    1 |                NULL |
+|    2 |                20.0 |
++------+---------------------+
+```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgx.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgx.md
new file mode 100644
index 00000000000..293506d0fc1
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgx.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "REGR_AVGX",
+    "language": "zh-CN",
+    "description": "REGRAVGX 函数用于返回组内非空值对中自变量 (x) 的平均值。"
+}
+---
+
+## 描述
+
+返回组内非空 `(y, x)` 值对中自变量 `x` 的平均值,其中 `x` 为自变量,`y` 为因变量。
+
+:::info
+该函数从 Apache Doris 4.1.1 版本开始支持。
+:::
+
+## 语法
+
+```sql
+REGR_AVGX(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示非空 `(y, x)` 值对中 `x` 的平均值。
+如果没有行,或者只有包含空值的行,函数返回 `NULL`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_AVGX(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+--------------------+
+| id   | REGR_AVGX(y, x)   |
++------+--------------------+
+|    1 |               NULL |
+|    2 |                2.5 |
++------+--------------------+
+```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgy.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgy.md
new file mode 100644
index 00000000000..b7572f6651d
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgy.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "REGR_AVGY",
+    "language": "zh-CN",
+    "description": "REGRAVGY 函数用于返回组内非空值对中因变量 (y) 的平均值。"
+}
+---
+
+## 描述
+
+返回组内非空 `(y, x)` 值对中因变量 `y` 的平均值,其中 `x` 为自变量,`y` 为因变量。
+
+:::info
+该函数从 Apache Doris 4.1.1 版本开始支持。
+:::
+
+## 语法
+
+```sql
+REGR_AVGY(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示非空 `(y, x)` 值对中 `y` 的平均值。
+如果没有行,或者只有包含空值的行,函数返回 `NULL`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_AVGY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+------------------+
+| id   | REGR_AVGY(y, x) |
++------+------------------+
+|    1 |             NULL |
+|    2 |              6.0 |
++------+------------------+
+```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-count.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-count.md
new file mode 100644
index 00000000000..aaf4b82414a
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-count.md
@@ -0,0 +1,70 @@
+---
+{
+    "title": "REGR_COUNT",
+    "language": "zh-CN",
+    "description": "REGRCOUNT 函数用于返回组内非空值对的数量。"
+}
+---
+
+## 描述
+
+返回组内非空 `(y, x)` 值对的数量,其中 `x` 为自变量,`y` 为因变量。如果不存在有效的非空值对,函数返回 `0`。
+
+:::info
+该函数从 Apache Doris 4.1.1 版本开始支持。
+:::
+
+## 语法
+
+```sql
+REGR_COUNT(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 BIGINT 类型的值,表示非空 `(y, x)` 值对的数量。
+如果组内没有行,或者不存在有效的非空 `(y, x)` 值对,函数返回 `0`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_COUNT(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+-------------------+
+| id   | REGR_COUNT(y, x)  |
++------+-------------------+
+|    1 |                 0 |
+|    2 |                 4 |
++------+-------------------+
+```
+
+REGR_COUNT 仅统计非空 `(y, x)` 值对,因此分组 1 返回 `0`。
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-intercept.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
index 67d03fb5334..3ae1e106046 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
@@ -8,11 +8,7 @@
 
 ## 描述
 
-`REGR_INTERCEPT` 函数用于计算线性回归方程中的截距(y 轴截距)。它返回组内非空值对的单变量线性回归线的截距。对于非空值对,使用以下公式计算:
-
-`AVG(y) - REGR_SLOPE(y, x) * AVG(x)`
-
-其中 `x` 是自变量,`y` 是因变量。
+返回基于组内非空 `(y, x)` 值对计算得到的线性回归线截距,其中 `x` 为自变量,`y` 为因变量。它等价于 `AVG(y) - REGR_SLOPE(y, x) * AVG(x)`。
 
 ## 语法
 
@@ -30,55 +26,39 @@ REGR_INTERCEPT(<y>, <x>)
 ## 返回值
 
 返回 Double 类型的值,表示线性回归线与 `y` 轴的交点。
-如果没有行,或者只有包含空值的行,函数返回 NULL。
+如果组内没有行,或者表达式都为 `NULL`,函数返回 `NULL`。
 
 ## 举例
 
 ```sql
--- setup
-CREATE TABLE test_regr_intercept (
+CREATE TABLE test_regr (
   `id` int,
-  `x` int,
-  `y` int
+  `x` double,
+  `y` double
 ) DUPLICATE KEY (`id`)
 DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
 PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
 );
 
--- 插入示例数据
-INSERT INTO test_regr_intercept VALUES
-(1, 18, 13),
-(2, 14, 27),
-(3, 12, 2),
-(4, 5, 6),
-(5, 10, 20);
-```
-
-```sql
-SELECT REGR_INTERCEPT(y, x) FROM test_regr_intercept;
-```
-
-计算 x 和 y 的线性回归截距。
-
-```text
-+-------------------------+
-| regr_intercept(y, x)    |
-+-------------------------+
-|      5.512931034482759  | 
-+-------------------------+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
 ```
 
 ```sql
-SELECT REGR_INTERCEPT(y, x) FROM test_regr_intercept where x>100;
+SELECT id, REGR_INTERCEPT(y, x) FROM test_regr GROUP BY id ORDER BY id;
 ```
 
-组内没有数据时,返回 NULL 。
-
 ```text
-+----------------------+
-| REGR_INTERCEPT(y, x) |
-+----------------------+
-|                 NULL |
-+----------------------+
++------+----------------------+
+| id   | REGR_INTERCEPT(y, x) |
++------+----------------------+
+|    1 |                 NULL |
+|    2 |                  1.0 |
++------+----------------------+
 ```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-r2.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-r2.md
new file mode 100644
index 00000000000..6d45c1a2cf3
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-r2.md
@@ -0,0 +1,79 @@
+---
+{
+    "title": "REGR_R2",
+    "language": "zh-CN",
+    "description": "REGRR2 函数用于返回组内非空值对的线性回归决定系数。"
+}
+---
+
+## 描述
+
+返回基于组内非空 `(y, x)` 值对计算得到的线性回归决定系数,其中 `x` 为自变量,`y` 为因变量。
+
+:::info
+该函数从 Apache Doris 4.1.1 版本开始支持。
+:::
+
+## 语法
+
+```sql
+REGR_R2(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示决定系数(R 平方)。
+- 如果 `REGR_COUNT(y, x) < 1`,函数返回 `NULL`。
+- 如果 `VAR_POP(x) = 0`,函数返回 `NULL`。
+- 如果 `VAR_POP(y) = 0`,函数返回 `1`。
+- 否则,函数返回 `POWER(CORR(y, x), 2)`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL),
+(3, 1, 5),
+(3, 1, 7),
+(4, 1, 5),
+(4, 2, 5);
+```
+
+```sql
+SELECT id, REGR_R2(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+---------------------+
+| id   | REGR_R2(y, x)       |
++------+---------------------+
+|    1 |                NULL |
+|    2 |                 1.0 |
+|    3 |                NULL |
+|    4 |                 1.0 |
++------+---------------------+
+```
+
+分组 3 展示了 `VAR_POP(x) = 0` 的情况,因此结果为 `NULL`;分组 4 展示了 `VAR_POP(y) = 0` 的情况,因此结果为 `1.0`。
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-slope.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-slope.md
index 199f2f19a87..9853a5ab51c 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-slope.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-slope.md
@@ -8,8 +8,7 @@
 
 ## 描述
 
-`REGR_SLOPE` 函数用于计算线性回归方程中的斜率。它返回组内非空值对的单变量线性回归线的斜率。
-
+返回基于组内非空 `(y, x)` 值对计算得到的线性回归线斜率,其中 `x` 为自变量,`y` 为因变量。它等价于 `COVAR_POP(y, x) / VAR_POP(x)`。
 
 ## 语法
 
@@ -27,55 +26,39 @@ REGR_SLOPE(<y>, <x>)
 ## 返回值
 
 返回 Double 类型的值,表示线性回归线的斜率。
-如果没有行,或者只有包含空值的行,函数返回 NULL。
+如果组内没有行,或者表达式都为 `NULL`,函数返回 `NULL`。
 
 ## 举例
 
 ```sql
--- setup
-CREATE TABLE test_regr_slope (
+CREATE TABLE test_regr (
   `id` int,
-  `x` int,
-  `y` int
+  `x` double,
+  `y` double
 ) DUPLICATE KEY (`id`)
 DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
 PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
 );
 
--- 插入示例数据
-INSERT INTO test_regr_slope VALUES
-(1, 18, 13),
-(2, 14, 27),
-(3, 12, 2),
-(4, 5, 6),
-(5, 10, 20);
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
 ```
 
 ```sql
-SELECT REGR_SLOPE(y, x) FROM test_regr_slope;
-```
-
-计算 x 和 y 的线性回归截距。
-
-```text
-+--------------------+
-| REGR_SLOPE(y, x)   |
-+--------------------+
-| 0.6853448275862069 |
-+--------------------+
+SELECT id, REGR_SLOPE(y, x) FROM test_regr GROUP BY id ORDER BY id;
 ```
 
-```sql
-SELECT REGR_SLOPE(y, x) FROM test_regr_slope where x>100;
-```
-
-组内没有数据时,返回 NULL 。
-
 ```text
-+------------------+
-| REGR_SLOPE(y, x) |
-+------------------+
-|             NULL |
-+------------------+
++------+--------------------+
+| id   | REGR_SLOPE(y, x)   |
++------+--------------------+
+|    1 |               NULL |
+|    2 |                2.0 |
++------+--------------------+
 ```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxx.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxx.md
new file mode 100644
index 00000000000..9bb09979939
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxx.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "REGR_SXX",
+    "language": "zh-CN",
+    "description": "REGRSXX 函数用于返回组内非空值对中自变量 (x) 的离差平方和。"
+}
+---
+
+## 描述
+
+返回自变量 `x` 相对于其均值的离差平方和,基于组内非空 `(y, x)` 值对计算,其中 `x` 为自变量,`y` 为因变量。它等价于 `REGR_COUNT(y, x) * VAR_POP(x)`。
+
+:::info
+该函数从 Apache Doris 4.1.1 版本开始支持。
+:::
+
+## 语法
+
+```sql
+REGR_SXX(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示 `x` 相对于其均值的离差平方和。
+如果组内没有行,或者表达式都为 `NULL`,函数返回 `NULL`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SXX(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+--------------------+
+| id   | REGR_SXX(y, x)    |
++------+--------------------+
+|    1 |               NULL |
+|    2 |                5.0 |
++------+--------------------+
+```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxy.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxy.md
new file mode 100644
index 00000000000..d37e26a154a
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxy.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "REGR_SXY",
+    "language": "zh-CN",
+    "description": "REGRSXY 函数用于返回组内非空值对中自变量 (x) 和因变量 (y) 的离差积和。"
+}
+---
+
+## 描述
+
+返回 `x` 和 `y` 分别相对于各自均值的离差乘积之和,基于组内非空 `(y, x)` 值对计算,其中 `x` 为自变量,`y` 为因变量。它等价于 `REGR_COUNT(y, x) * COVAR_POP(y, x)`。
+
+:::info
+该函数从 Apache Doris 4.1.1 版本开始支持。
+:::
+
+## 语法
+
+```sql
+REGR_SXY(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示 `x` 和 `y` 分别相对于各自均值的离差乘积之和。
+如果组内没有行,或者表达式都为 `NULL`,函数返回 `NULL`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SXY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+-----------------+
+| id   | REGR_SXY(y, x) |
++------+-----------------+
+|    1 |            NULL |
+|    2 |            10.0 |
++------+-----------------+
+```
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-syy.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-syy.md
new file mode 100644
index 00000000000..b883d4799bb
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-syy.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "REGR_SYY",
+    "language": "zh-CN",
+    "description": "REGRSYY 函数用于返回组内非空值对中因变量 (y) 的离差平方和。"
+}
+---
+
+## 描述
+
+返回因变量 `y` 相对于其均值的离差平方和,基于组内非空 `(y, x)` 值对计算,其中 `x` 为自变量,`y` 为因变量。它等价于 `REGR_COUNT(y, x) * VAR_POP(y)`。
+
+:::info
+该函数从 Apache Doris 4.1.1 版本开始支持。
+:::
+
+## 语法
+
+```sql
+REGR_SYY(<y>, <x>)
+```
+
+## 参数
+
+| 参数 | 说明 |
+| -- | -- |
+| `<y>` | 因变量,支持类型为 Double。 |
+| `<x>` | 自变量,支持类型为 Double。 |
+
+## 返回值
+
+返回 Double 类型的值,表示 `y` 相对于其均值的离差平方和。
+如果组内没有行,或者表达式都为 `NULL`,函数返回 `NULL`。
+
+## 举例
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SYY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+-----------------+
+| id   | REGR_SYY(y, x) |
++------+-----------------+
+|    1 |            NULL |
+|    2 |            20.0 |
++------+-----------------+
+```
diff --git a/sidebars.ts b/sidebars.ts
index f069d4053b5..4d2a5e36130 100644
--- a/sidebars.ts
+++ b/sidebars.ts
@@ -2017,8 +2017,15 @@ const sidebars: SidebarsConfig = {
                                 'sql-manual/sql-functions/aggregate-functions/percentile-approx-weighted',
                                 'sql-manual/sql-functions/aggregate-functions/percentile_reservoir',
                                 'sql-manual/sql-functions/aggregate-functions/quantile-union',
+                                'sql-manual/sql-functions/aggregate-functions/regr-avgx',
+                                'sql-manual/sql-functions/aggregate-functions/regr-avgy',
+                                'sql-manual/sql-functions/aggregate-functions/regr-count',
                                 'sql-manual/sql-functions/aggregate-functions/regr-intercept',
+                                'sql-manual/sql-functions/aggregate-functions/regr-r2',
                                 'sql-manual/sql-functions/aggregate-functions/regr-slope',
+                                'sql-manual/sql-functions/aggregate-functions/regr-sxx',
+                                'sql-manual/sql-functions/aggregate-functions/regr-sxy',
+                                'sql-manual/sql-functions/aggregate-functions/regr-syy',
                                 'sql-manual/sql-functions/aggregate-functions/retention',
                                 'sql-manual/sql-functions/aggregate-functions/sem',
                                 'sql-manual/sql-functions/aggregate-functions/sequence-count',
@@ -2105,8 +2112,15 @@ const sidebars: SidebarsConfig = {
                                 'sql-manual/sql-functions/aggregate-functions/percentile-array',
                                 'sql-manual/sql-functions/aggregate-functions/percentile-approx-weighted',
                                 'sql-manual/sql-functions/aggregate-functions/quantile-union',
+                                'sql-manual/sql-functions/aggregate-functions/regr-avgx',
+                                'sql-manual/sql-functions/aggregate-functions/regr-avgy',
+                                'sql-manual/sql-functions/aggregate-functions/regr-count',
                                 'sql-manual/sql-functions/aggregate-functions/regr-intercept',
+                                'sql-manual/sql-functions/aggregate-functions/regr-r2',
                                 'sql-manual/sql-functions/aggregate-functions/regr-slope',
+                                'sql-manual/sql-functions/aggregate-functions/regr-sxx',
+                                'sql-manual/sql-functions/aggregate-functions/regr-sxy',
+                                'sql-manual/sql-functions/aggregate-functions/regr-syy',
                                 'sql-manual/sql-functions/aggregate-functions/retention',
                                 'sql-manual/sql-functions/aggregate-functions/sequence-count',
                                 'sql-manual/sql-functions/aggregate-functions/sequence-match',
diff --git a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgx.md b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgx.md
new file mode 100644
index 00000000000..edb8d6a4588
--- /dev/null
+++ b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgx.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "REGR_AVGX",
+    "language": "en",
+    "description": "Returns the average of the independent variable (x) for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the average of the independent variable `x` over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable.
+
+:::info
+This function is supported since Apache Doris version 4.1.1.
+:::
+
+## Syntax
+
+```sql
+REGR_AVGX(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the average of `x` for non-null `(y, x)` pairs.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_AVGX(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+--------------------+
+| id   | REGR_AVGX(y, x)    |
++------+--------------------+
+|    1 |               NULL |
+|    2 |                2.5 |
++------+--------------------+
+```
diff --git a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgy.md b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgy.md
new file mode 100644
index 00000000000..cae5f1b96b5
--- /dev/null
+++ b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-avgy.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "REGR_AVGY",
+    "language": "en",
+    "description": "Returns the average of the dependent variable (y) for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the average of the dependent variable `y` over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable.
+
+:::info
+This function is supported since Apache Doris version 4.1.1.
+:::
+
+## Syntax
+
+```sql
+REGR_AVGY(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the average of `y` for non-null `(y, x)` pairs.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_AVGY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+------------------+
+| id   | REGR_AVGY(y, x)  |
++------+------------------+
+|    1 |             NULL |
+|    2 |              6.0 |
++------+------------------+
+```
diff --git a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-count.md b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-count.md
new file mode 100644
index 00000000000..205de55d173
--- /dev/null
+++ b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-count.md
@@ -0,0 +1,70 @@
+---
+{
+    "title": "REGR_COUNT",
+    "language": "en",
+    "description": "Returns the number of non-null (y, x) pairs in a group."
+}
+---
+
+## Description
+
+Returns the number of non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. If there are no valid non-null pairs, the function returns `0`.
+
+:::info
+This function is supported since Apache Doris version 4.1.1.
+:::
+
+## Syntax
+
+```sql
+REGR_COUNT(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a BIGINT value representing the number of non-null `(y, x)` pairs.
+If there are no rows in the group, or there are no valid non-null `(y, x)` pairs, the function returns `0`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_COUNT(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+-------------------+
+| id   | REGR_COUNT(y, x)  |
++------+-------------------+
+|    1 |                 0 |
+|    2 |                 4 |
++------+-------------------+
+```
+
+REGR_COUNT counts only non-null `(y, x)` pairs, so group 1 returns `0`.
diff --git a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-intercept.md b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
index 900de4f7d28..583e48be7ea 100644
--- a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
+++ b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-intercept.md
@@ -2,17 +2,13 @@
 {
     "title": "REGR_INTERCEPT",
     "language": "en",
-    "description": "Returns the intercept of the univariate linear regression line for non-null pairs in a group."
+    "description": "Returns the intercept of the linear regression line for non-null pairs in a group."
 }
 ---
 
 ## Description
 
-Returns the intercept of the univariate linear regression line for non-null pairs in a group. It is computed for non-null pairs using the following formula:
-
-`AVG(y) - REGR_SLOPE(y, x) * AVG(x)`
-
-Where `x` is the independent variable and y is the dependent variable.
+Returns the intercept of the linear regression line computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. It is equivalent to `AVG(y) - REGR_SLOPE(y, x) * AVG(x)`.
 
 ## Syntax
 
@@ -29,52 +25,40 @@ REGR_INTERCEPT(<y>, <x>)
 
 ## Return Value
 
-Returns a Double value representing the intercept of the univariate linear regression line for non-null pairs in a group. If there are no rows, or only rows that contain nulls, the function returns NULL.
+Returns a Double value representing the intercept of the linear regression line.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
 
-## Examples
+## Example
 
 ```sql
--- Create sample table
-CREATE TABLE test_regr_intercept (
+CREATE TABLE test_regr (
   `id` int,
-  `x` int,
-  `y` int
+  `x` double,
+  `y` double
 ) DUPLICATE KEY (`id`)
 DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
 PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
 );
 
--- Insert sample data
-INSERT INTO test_regr_intercept VALUES
-(1, 18, 13),
-(2, 14, 27),
-(3, 12, 2),
-(4, 5, 6),
-(5, 10, 20);
-
--- Calculate the linear regression intercept of x and y
-SELECT REGR_INTERCEPT(y, x) FROM test_regr_intercept;
-```
-
-```text
-+----------------------+
-| REGR_INTERCEPT(y, x) |
-+----------------------+
-|    5.512931034482759 |
-+----------------------+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
 ```
 
 ```sql
-SELECT REGR_INTERCEPT(y, x) FROM test_regr_intercept where x>100;
+SELECT id, REGR_INTERCEPT(y, x) FROM test_regr GROUP BY id ORDER BY id;
 ```
 
-When there are no rows in the group, the function returns `NULL`.
-
 ```text
-+----------------------+
-| REGR_INTERCEPT(y, x) |
-+----------------------+
-|                 NULL |
-+----------------------+
++------+----------------------+
+| id   | REGR_INTERCEPT(y, x) |
++------+----------------------+
+|    1 |                 NULL |
+|    2 |                  1.0 |
++------+----------------------+
 ```
diff --git a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-r2.md b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-r2.md
new file mode 100644
index 00000000000..941e36caffa
--- /dev/null
+++ b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-r2.md
@@ -0,0 +1,79 @@
+---
+{
+    "title": "REGR_R2",
+    "language": "en",
+    "description": "Returns the coefficient of determination of the linear regression for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the coefficient of determination of the linear regression computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable.
+
+:::info
+This function is supported since Apache Doris version 4.1.1.
+:::
+
+## Syntax
+
+```sql
+REGR_R2(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the coefficient of determination (R-squared).
+- If `REGR_COUNT(y, x) < 1`, the function returns `NULL`.
+- If `VAR_POP(x) = 0`, the function returns `NULL`.
+- If `VAR_POP(y) = 0`, the function returns `1`.
+- Otherwise, the function returns `POWER(CORR(y, x), 2)`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL),
+(3, 1, 5),
+(3, 1, 7),
+(4, 1, 5),
+(4, 2, 5);
+```
+
+```sql
+SELECT id, REGR_R2(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+---------------------+
+| id   | REGR_R2(y, x)       |
++------+---------------------+
+|    1 |                NULL |
+|    2 |                 1.0 |
+|    3 |                NULL |
+|    4 |                 1.0 |
++------+---------------------+
+```
+
+Group 3 shows the `VAR_POP(x) = 0` case, so the result is `NULL`, and group 4 shows the `VAR_POP(y) = 0` case, so the result is `1.0`.
diff --git a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-slope.md b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-slope.md
index 87f50fe7def..a9d0c648193 100644
--- a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-slope.md
+++ b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-slope.md
@@ -8,8 +8,7 @@
 
 ## Description
 
-Returns the slope of the linear regression line for non-null pairs in a group.
-
+Returns the slope of the linear regression line computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. It is equivalent to `COVAR_POP(y, x) / VAR_POP(x)`.
 
 ## Syntax
 
@@ -29,54 +28,37 @@ REGR_SLOPE(<y>, <x>)
 Returns a Double value representing the slope of the linear regression line.
 If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
 
-## Examples
+## Example
 
 ```sql
--- setup
-CREATE TABLE test_regr_slope (
+CREATE TABLE test_regr (
   `id` int,
-  `x` int,
-  `y` int
+  `x` double,
+  `y` double
 ) DUPLICATE KEY (`id`)
 DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
 PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
 );
 
--- Insert example data
-INSERT INTO test_regr_slope VALUES
-(1, 18, 13),
-(2, 14, 27),
-(3, 12, 2),
-(4, 5, 6),
-(5, 10, 20);
-```
-
-```sql
-SELECT REGR_SLOPE(y, x) FROM test_regr_slope;
-```
-
-Calculate the linear regression slope of x and y.
-
-
-```text
-+--------------------+
-| REGR_SLOPE(y, x)   |
-+--------------------+
-| 0.6853448275862069 |
-+--------------------+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
 ```
 
 ```sql
-SELECT REGR_SLOPE(y, x) FROM test_regr_slope where x>100;
+SELECT id, REGR_SLOPE(y, x) FROM test_regr GROUP BY id ORDER BY id;
 ```
 
-When there are no rows in the group, the function returns `NULL`.
-
 ```text
-+------------------+
-| REGR_SLOPE(y, x) |
-+------------------+
-|             NULL |
-+------------------+
++------+--------------------+
+| id   | REGR_SLOPE(y, x)   |
++------+--------------------+
+|    1 |               NULL |
+|    2 |                2.0 |
++------+--------------------+
 ```
diff --git a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxx.md b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxx.md
new file mode 100644
index 00000000000..ba5e88c8996
--- /dev/null
+++ b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxx.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "REGR_SXX",
+    "language": "en",
+    "description": "Returns the sum of squares of the independent variable (x) for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the sum of squared deviations of the independent variable `x` from its mean, computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. It is equivalent to `REGR_COUNT(y, x) * VAR_POP(x)`.
+
+:::info
+This function is supported since Apache Doris version 4.1.1.
+:::
+
+## Syntax
+
+```sql
+REGR_SXX(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the sum of squared deviations of `x` from its mean.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SXX(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+--------------------+
+| id   | REGR_SXX(y, x)     |
++------+--------------------+
+|    1 |               NULL |
+|    2 |                5.0 |
++------+--------------------+
+```
diff --git a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxy.md b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxy.md
new file mode 100644
index 00000000000..74b1e9a9b92
--- /dev/null
+++ b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-sxy.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "REGR_SXY",
+    "language": "en",
+    "description": "Returns the sum of products of the independent variable (x) and the dependent variable (y) for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the sum of the products of the deviations of `x` and `y` from their respective means, computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. It is equivalent to `REGR_COUNT(y, x) * COVAR_POP(y, x)`.
+
+:::info
+This function is supported since Apache Doris version 4.1.1.
+:::
+
+## Syntax
+
+```sql
+REGR_SXY(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the sum of the products of the deviations of `x` and `y` from their respective means.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SXY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+-----------------+
+| id   | REGR_SXY(y, x)  |
++------+-----------------+
+|    1 |            NULL |
+|    2 |            10.0 |
++------+-----------------+
+```
diff --git a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-syy.md b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-syy.md
new file mode 100644
index 00000000000..44669dce4d8
--- /dev/null
+++ b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/regr-syy.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "REGR_SYY",
+    "language": "en",
+    "description": "Returns the sum of squares of the dependent variable (y) for non-null pairs in a group."
+}
+---
+
+## Description
+
+Returns the sum of squared deviations of the dependent variable `y` from its mean, computed over non-null `(y, x)` pairs in a group, where `x` is the independent variable and `y` is the dependent variable. It is equivalent to `REGR_COUNT(y, x) * VAR_POP(y)`.
+
+:::info
+This function is supported since Apache Doris version 4.1.1.
+:::
+
+## Syntax
+
+```sql
+REGR_SYY(<y>, <x>)
+```
+
+## Parameters
+
+| Parameter | Description |
+| -- | -- |
+| `<y>` | The dependent variable. Supported type: Double. |
+| `<x>` | The independent variable. Supported type: Double. |
+
+## Return Value
+
+Returns a Double value representing the sum of squared deviations of `y` from its mean.
+If there are no rows in the group, or all rows contain NULLs for the expressions, the function returns `NULL`.
+
+## Example
+
+```sql
+CREATE TABLE test_regr (
+  `id` int,
+  `x` double,
+  `y` double
+) DUPLICATE KEY (`id`)
+DISTRIBUTED BY HASH(`id`) BUCKETS AUTO
+PROPERTIES (
+  "replication_allocation" = "tag.location.default: 1"
+);
+
+INSERT INTO test_regr VALUES
+(1, 0, NULL),
+(2, 1, 3),
+(2, 2, 5),
+(2, 3, 7),
+(2, 4, 9),
+(2, 5, NULL);
+```
+
+```sql
+SELECT id, REGR_SYY(y, x) FROM test_regr GROUP BY id ORDER BY id;
+```
+
+```text
++------+-----------------+
+| id   | REGR_SYY(y, x)  |
++------+-----------------+
+|    1 |            NULL |
+|    2 |            20.0 |
++------+-----------------+
+```
diff --git a/versioned_sidebars/version-4.x-sidebars.json b/versioned_sidebars/version-4.x-sidebars.json
index 51a8cb0a4d3..67a6e701858 100644
--- a/versioned_sidebars/version-4.x-sidebars.json
+++ b/versioned_sidebars/version-4.x-sidebars.json
@@ -2043,8 +2043,15 @@
                                 "sql-manual/sql-functions/aggregate-functions/percentile-approx-weighted",
                                 "sql-manual/sql-functions/aggregate-functions/percentile_reservoir",
                                 "sql-manual/sql-functions/aggregate-functions/quantile-union",
+                                "sql-manual/sql-functions/aggregate-functions/regr-avgx",
+                                "sql-manual/sql-functions/aggregate-functions/regr-avgy",
+                                "sql-manual/sql-functions/aggregate-functions/regr-count",
                                 "sql-manual/sql-functions/aggregate-functions/regr-intercept",
+                                "sql-manual/sql-functions/aggregate-functions/regr-r2",
                                 "sql-manual/sql-functions/aggregate-functions/regr-slope",
+                                "sql-manual/sql-functions/aggregate-functions/regr-sxx",
+                                "sql-manual/sql-functions/aggregate-functions/regr-sxy",
+                                "sql-manual/sql-functions/aggregate-functions/regr-syy",
                                 "sql-manual/sql-functions/aggregate-functions/retention",
                                 "sql-manual/sql-functions/aggregate-functions/sequence-count",
                                 "sql-manual/sql-functions/aggregate-functions/sequence-match",
@@ -2130,8 +2137,15 @@
                                 "sql-manual/sql-functions/aggregate-functions/percentile-array",
                                 "sql-manual/sql-functions/aggregate-functions/percentile-approx-weighted",
                                 "sql-manual/sql-functions/aggregate-functions/quantile-union",
+                                "sql-manual/sql-functions/aggregate-functions/regr-avgx",
+                                "sql-manual/sql-functions/aggregate-functions/regr-avgy",
+                                "sql-manual/sql-functions/aggregate-functions/regr-count",
                                 "sql-manual/sql-functions/aggregate-functions/regr-intercept",
+                                "sql-manual/sql-functions/aggregate-functions/regr-r2",
                                 "sql-manual/sql-functions/aggregate-functions/regr-slope",
+                                "sql-manual/sql-functions/aggregate-functions/regr-sxx",
+                                "sql-manual/sql-functions/aggregate-functions/regr-sxy",
+                                "sql-manual/sql-functions/aggregate-functions/regr-syy",
                                 "sql-manual/sql-functions/aggregate-functions/retention",
                                 "sql-manual/sql-functions/aggregate-functions/sequence-count",
                                 "sql-manual/sql-functions/aggregate-functions/sequence-match",


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