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

lancelly pushed a commit to branch max_by_docs
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git

commit b5ed66088ea73ec488b4eba54c215b81b96fa62e
Author: lancelly <[email protected]>
AuthorDate: Wed Feb 28 16:48:17 2024 +0800

    max_by_docs
---
 .../Master/User-Manual/Operator-and-Expression.md  | 34 +++++++++++-----------
 .../stage/Operators-Functions/Aggregation.md       |  4 +++
 .../latest/User-Manual/Operator-and-Expression.md  | 34 +++++++++++-----------
 .../stage/Operators-Functions/Aggregation.md       |  4 +++
 4 files changed, 42 insertions(+), 34 deletions(-)

diff --git a/src/UserGuide/Master/User-Manual/Operator-and-Expression.md 
b/src/UserGuide/Master/User-Manual/Operator-and-Expression.md
index 4454f44..c7a4dd9 100644
--- a/src/UserGuide/Master/User-Manual/Operator-and-Expression.md
+++ b/src/UserGuide/Master/User-Manual/Operator-and-Expression.md
@@ -99,23 +99,23 @@ The built-in functions can be used in IoTDB without 
registration, and the functi
 
 ### Aggregate Functions
 
-| Function Name | Description                                                  
| Allowed Input Series Data Types | Required Attributes                         
                 | Output Series Data Type             |
-| ------------- | ------------------------------------------------------------ 
| ------------------------------- | 
------------------------------------------------------------ | 
----------------------------------- |
-| SUM           | Summation.                                                   
| INT32 INT64 FLOAT DOUBLE        | /                                           
                 | DOUBLE                              |
-| COUNT         | Counts the number of data points.                            
| All types                       | /                                           
                 | INT                                 |
-| AVG           | Average.                                                     
| INT32 INT64 FLOAT DOUBLE        | /                                           
                 | DOUBLE                              |
-| EXTREME       | Finds the value with the largest absolute value. Returns a 
positive value if the maximum absolute value of positive and negative values is 
equal. | INT32 INT64 FLOAT DOUBLE        | /                                    
                        | Consistent with the input data type |
-| MAX_VALUE     | Find the maximum value.                                      
| INT32 INT64 FLOAT DOUBLE        | /                                           
                 | Consistent with the input data type |
-| MIN_VALUE     | Find the minimum value.                                      
| INT32 INT64 FLOAT DOUBLE        | /                                           
                 | Consistent with the input data type |
-| FIRST_VALUE   | Find the value with the smallest timestamp.                  
| All data types                  | /                                           
                 | Consistent with input data type     |
-| LAST_VALUE    | Find the value with the largest timestamp.                   
| All data types                  | /                                           
                 | Consistent with input data type     |
-| MAX_TIME      | Find the maximum timestamp.                                  
| All data Types                  | /                                           
                 | Timestamp                           |
-| MIN_TIME      | Find the minimum timestamp.                                  
| All data Types                  | /                                           
                 | Timestamp                           |
-| COUNT_IF      | Find the number of data points that continuously meet a 
given condition and the number of data points that meet the condition 
(represented by keep) meet the specified threshold. | BOOLEAN                   
      | `[keep >=/>/=/!=/</<=]threshold`:The specified threshold or threshold 
condition, it is equivalent to `keep >= threshold` if `threshold` is used 
alone, type of `threshold` is `INT64` `ignoreNull`:Optional, default value is 
`true`;If the value is `true`, null va [...]
-| TIME_DURATION | Find the difference between the timestamp of the largest 
non-null value and the timestamp of the smallest non-null value in a column | 
All data Types                  | /                                             
               | INT64                               |
-| MODE          | Find the mode. Note:  1.Having too many different values in 
the input series risks a memory exception;  2.If all the elements have the same 
number of occurrences, that is no Mode, return the value with earliest time;  
3.If there are many Modes, return the Mode with earliest time. | All data Types 
                 | /                                                            
| Consistent with the input data type |
-| MAX_BY        | MAX_BY(x, y) returns the value of x corresponding to the 
maximum value of the input y. MAX_BY(time, x) returns the timestamp when x is 
at its maximum value.                                                           
                                                                  | The first 
input x can be of any type, while the second input y must be of type INT32, 
INT64, FLOAT, or DOUBLE. | Consistent with the data type of the first input x. |
-| MIN_BY        | MIN_BY(x, y) returns the value of x corresponding to the 
minimum value of the input y. MIN_BY(time, x) returns the timestamp when x is 
at its minimum value.                                                           
                                                                  | The first 
input x can be of any type, while the second input y must be of type INT32, 
INT64, FLOAT, or DOUBLE. | Consistent with the data type of the first input x. |
+| Function Name | Description                                                  
| Allowed Input Series Data Types | Required Attributes                         
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| ------------- | ------------------------------------------------------------ 
| ------------------------------- 
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 [...]
+| SUM           | Summation.                                                   
| INT32 INT64 FLOAT DOUBLE        | /                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| COUNT         | Counts the number of data points.                            
| All types                       | /                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| AVG           | Average.                                                     
| INT32 INT64 FLOAT DOUBLE        | /                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| EXTREME       | Finds the value with the largest absolute value. Returns a 
positive value if the maximum absolute value of positive and negative values is 
equal. | INT32 INT64 FLOAT DOUBLE        | /                                    
                                                                                
                                                                                
                                                                                
                [...]
+| MAX_VALUE     | Find the maximum value.                                      
| INT32 INT64 FLOAT DOUBLE        | /                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| MIN_VALUE     | Find the minimum value.                                      
| INT32 INT64 FLOAT DOUBLE        | /                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| FIRST_VALUE   | Find the value with the smallest timestamp.                  
| All data types                  | /                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| LAST_VALUE    | Find the value with the largest timestamp.                   
| All data types                  | /                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| MAX_TIME      | Find the maximum timestamp.                                  
| All data Types                  | /                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| MIN_TIME      | Find the minimum timestamp.                                  
| All data Types                  | /                                           
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| COUNT_IF      | Find the number of data points that continuously meet a 
given condition and the number of data points that meet the condition 
(represented by keep) meet the specified threshold. | BOOLEAN                   
      | `[keep >=/>/=/!=/</<=]threshold`:The specified threshold or threshold 
condition, it is equivalent to `keep >= threshold` if `threshold` is used 
alone, type of `threshold` is `INT64` `ignoreNull`:Optional, default value is 
`true`;If the value is `true`, null va [...]
+| TIME_DURATION | Find the difference between the timestamp of the largest 
non-null value and the timestamp of the smallest non-null value in a column | 
All data Types                  | /                                             
                                                                                
                                                                                
                                                                                
                    [...]
+| MODE          | Find the mode. Note:  1.Having too many different values in 
the input series risks a memory exception;  2.If all the elements have the same 
number of occurrences, that is no Mode, return the value with earliest time;  
3.If there are many Modes, return the Mode with earliest time. | All data Types 
                 | /                                                            
                                                                                
                 [...]
+| MAX_BY        | MAX_BY(x, y) returns the value of x corresponding to the 
maximum value of the input y. MAX_BY(time, x) returns the timestamp when x is 
at its maximum value.                                                           
                                                                  | The first 
input x can be of any type, while the second input y must be of type INT32, 
INT64, FLOAT, or DOUBLE. | /                                                    
                          [...]
+| MIN_BY        | MIN_BY(x, y) returns the value of x corresponding to the 
minimum value of the input y. MIN_BY(time, x) returns the timestamp when x is 
at its minimum value.                                                           
                                                                  | The first 
input x can be of any type, while the second input y must be of type INT32, 
INT64, FLOAT, or DOUBLE. | / | Consistent with the data type of the first input 
x. |
 
 
 For details and examples, see the document [Aggregate 
Functions](../Operators-Functions/Aggregation.md).
diff --git a/src/UserGuide/Master/stage/Operators-Functions/Aggregation.md 
b/src/UserGuide/Master/stage/Operators-Functions/Aggregation.md
index afcbada..f0ae901 100644
--- a/src/UserGuide/Master/stage/Operators-Functions/Aggregation.md
+++ b/src/UserGuide/Master/stage/Operators-Functions/Aggregation.md
@@ -314,6 +314,7 @@ select max_by(time, x) from root.sg
 #### Examples
 
 ##### Input Data
+
 ```sql
 IoTDB> select * from root.test
 +-----------------------------+-----------+-----------+
@@ -328,7 +329,9 @@ IoTDB> select * from root.test
 +-----------------------------+-----------+-----------+
 ```
 ##### Query Example
+
 Querying the timestamp corresponding to the maximum value:
+
 ```sql
 IoTDB> select max_by(time, a), max_value(a) from root.test
 +-------------------------+------------------------+
@@ -379,6 +382,7 @@ IoTDB> select max_by(b, a) from root.test group by 
([0,7),4ms) having max_by(b,
 |1970-01-01T08:00:00.004+08:00|                            10.0|
 +-----------------------------+--------------------------------+
 ```
+
 Using with order by clause:
 ```sql
 IoTDB> select max_by(b, a) from root.test group by ([0,7),4ms) order by time 
desc
diff --git a/src/UserGuide/latest/User-Manual/Operator-and-Expression.md 
b/src/UserGuide/latest/User-Manual/Operator-and-Expression.md
index 4ca8bf8..ded3567 100644
--- a/src/UserGuide/latest/User-Manual/Operator-and-Expression.md
+++ b/src/UserGuide/latest/User-Manual/Operator-and-Expression.md
@@ -99,23 +99,23 @@ The built-in functions can be used in IoTDB without 
registration, and the functi
 
 ### Aggregate Functions
 
-| Function Name | Description                                                  
                                                                                
                                                                                
                                                            | Allowed Input 
Series Data Types | Required Attributes                                         
 | Output Series Data Type             |
-|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 ------------------------------- | 
------------------------------------------------------------ | 
----------------------------------- |
-| SUM           | Summation.                                                   
                                                                                
                                                                                
                                                            | INT32 INT64 FLOAT 
DOUBLE        | /                                                            | 
DOUBLE                              |
-| COUNT         | Counts the number of data points.                            
                                                                                
                                                                                
                                                            | All types         
              | /                                                            | 
INT                                 |
-| AVG           | Average.                                                     
                                                                                
                                                                                
                                                            | INT32 INT64 FLOAT 
DOUBLE        | /                                                            | 
DOUBLE                              |
-| EXTREME       | Finds the value with the largest absolute value. Returns a 
positive value if the maximum absolute value of positive and negative values is 
equal.                                                                          
                                                              | INT32 INT64 
FLOAT DOUBLE        | /                                                         
   | Consistent with the input data type |
-| MAX_VALUE     | Find the maximum value.                                      
                                                                                
                                                                                
                                                            | INT32 INT64 FLOAT 
DOUBLE        | /                                                            | 
Consistent with the input data type |
-| MIN_VALUE     | Find the minimum value.                                      
                                                                                
                                                                                
                                                            | INT32 INT64 FLOAT 
DOUBLE        | /                                                            | 
Consistent with the input data type |
-| FIRST_VALUE   | Find the value with the smallest timestamp.                  
                                                                                
                                                                                
                                                            | All data types    
              | /                                                            | 
Consistent with input data type     |
-| LAST_VALUE    | Find the value with the largest timestamp.                   
                                                                                
                                                                                
                                                            | All data types    
              | /                                                            | 
Consistent with input data type     |
-| MAX_TIME      | Find the maximum timestamp.                                  
                                                                                
                                                                                
                                                            | All data Types    
              | /                                                            | 
Timestamp                           |
-| MIN_TIME      | Find the minimum timestamp.                                  
                                                                                
                                                                                
                                                            | All data Types    
              | /                                                            | 
Timestamp                           |
-| COUNT_IF      | Find the number of data points that continuously meet a 
given condition and the number of data points that meet the condition 
(represented by keep) meet the specified threshold.                             
                                                                           | 
BOOLEAN                         | `[keep >=/>/=/!=/</<=]threshold`:The 
specified threshold or threshold condition, it is equivalent to `keep >= 
threshold` if `threshold` is used alone, type o [...]
-| TIME_DURATION | Find the difference between the timestamp of the largest 
non-null value and the timestamp of the smallest non-null value in a column     
                                                                                
                                                                | All data 
Types                  | /                                                      
      | INT64                               |
-| MODE          | Find the mode. Note:  1.Having too many different values in 
the input series risks a memory exception;  2.If all the elements have the same 
number of occurrences, that is no Mode, return the value with earliest time;  
3.If there are many Modes, return the Mode with earliest time. | All data Types 
                 | /                                                            
| Consistent with the input data type |
-| MAX_BY        | MAX_BY(x, y) returns the value of x corresponding to the 
maximum value of the input y. MAX_BY(time, x) returns the timestamp when x is 
at its maximum value.                                                           
                                                                  | The first 
input x can be of any type, while the second input y must be of type INT32, 
INT64, FLOAT, or DOUBLE. | Consistent with the data type of the first input x. |
-| MIN_BY        | MIN_BY(x, y) returns the value of x corresponding to the 
minimum value of the input y. MIN_BY(time, x) returns the timestamp when x is 
at its minimum value.                                                           
                                                                  | The first 
input x can be of any type, while the second input y must be of type INT32, 
INT64, FLOAT, or DOUBLE. | Consistent with the data type of the first input x. |
+| Function Name | Description                                                  
                                                                                
                                                                                
                                                            | Allowed Input 
Series Data Types | Required Attributes                                         
                                                                                
                  [...]
+|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 ------------------------------- 
|--------------------------------------------------------------------------------------------------------------------------------------------------------------
 [...]
+| SUM           | Summation.                                                   
                                                                                
                                                                                
                                                            | INT32 INT64 FLOAT 
DOUBLE        | /                                                               
                                                                                
              [...]
+| COUNT         | Counts the number of data points.                            
                                                                                
                                                                                
                                                            | All types         
              | /                                                               
                                                                                
              [...]
+| AVG           | Average.                                                     
                                                                                
                                                                                
                                                            | INT32 INT64 FLOAT 
DOUBLE        | /                                                               
                                                                                
              [...]
+| EXTREME       | Finds the value with the largest absolute value. Returns a 
positive value if the maximum absolute value of positive and negative values is 
equal.                                                                          
                                                              | INT32 INT64 
FLOAT DOUBLE        | /                                                         
                                                                                
                    [...]
+| MAX_VALUE     | Find the maximum value.                                      
                                                                                
                                                                                
                                                            | INT32 INT64 FLOAT 
DOUBLE        | /                                                               
                                                                                
              [...]
+| MIN_VALUE     | Find the minimum value.                                      
                                                                                
                                                                                
                                                            | INT32 INT64 FLOAT 
DOUBLE        | /                                                               
                                                                                
              [...]
+| FIRST_VALUE   | Find the value with the smallest timestamp.                  
                                                                                
                                                                                
                                                            | All data types    
              | /                                                               
                                                                                
              [...]
+| LAST_VALUE    | Find the value with the largest timestamp.                   
                                                                                
                                                                                
                                                            | All data types    
              | /                                                               
                                                                                
              [...]
+| MAX_TIME      | Find the maximum timestamp.                                  
                                                                                
                                                                                
                                                            | All data Types    
              | /                                                               
                                                                                
              [...]
+| MIN_TIME      | Find the minimum timestamp.                                  
                                                                                
                                                                                
                                                            | All data Types    
              | /                                                               
                                                                                
              [...]
+| COUNT_IF      | Find the number of data points that continuously meet a 
given condition and the number of data points that meet the condition 
(represented by keep) meet the specified threshold.                             
                                                                           | 
BOOLEAN                         | `[keep >=/>/=/!=/</<=]threshold`:The 
specified threshold or threshold condition, it is equivalent to `keep >= 
threshold` if `threshold` is used alone, type o [...]
+| TIME_DURATION | Find the difference between the timestamp of the largest 
non-null value and the timestamp of the smallest non-null value in a column     
                                                                                
                                                                | All data 
Types                  | /                                                      
                                                                                
                       [...]
+| MODE          | Find the mode. Note:  1.Having too many different values in 
the input series risks a memory exception;  2.If all the elements have the same 
number of occurrences, that is no Mode, return the value with earliest time;  
3.If there are many Modes, return the Mode with earliest time. | All data Types 
                 | /                                                            
                                                                                
                 [...]
+| MAX_BY        | MAX_BY(x, y) returns the value of x corresponding to the 
maximum value of the input y. MAX_BY(time, x) returns the timestamp when x is 
at its maximum value.                                                           
                                                                  | The first 
input x can be of any type, while the second input y must be of type INT32, 
INT64, FLOAT, or DOUBLE. | /                                                    
                          [...]
+| MIN_BY        | MIN_BY(x, y) returns the value of x corresponding to the 
minimum value of the input y. MIN_BY(time, x) returns the timestamp when x is 
at its minimum value.                                                           
                                                                  | The first 
input x can be of any type, while the second input y must be of type INT32, 
INT64, FLOAT, or DOUBLE. | / | Consistent with the data type of the first input 
x. |
 
 For details and examples, see the document [Aggregate 
Functions](../Operators-Functions/Aggregation.md).
 
diff --git a/src/UserGuide/latest/stage/Operators-Functions/Aggregation.md 
b/src/UserGuide/latest/stage/Operators-Functions/Aggregation.md
index bf36b5b..b5a84c9 100644
--- a/src/UserGuide/latest/stage/Operators-Functions/Aggregation.md
+++ b/src/UserGuide/latest/stage/Operators-Functions/Aggregation.md
@@ -314,6 +314,7 @@ select max_by(time, x) from root.sg
 #### Examples
 
 ##### Input Data
+
 ```sql
 IoTDB> select * from root.test
 +-----------------------------+-----------+-----------+
@@ -327,7 +328,9 @@ IoTDB> select * from root.test
 |1970-01-01T08:00:00.006+08:00|        6.0|        6.0|
 +-----------------------------+-----------+-----------+
 ```
+
 ##### Query Example
+
 Querying the timestamp corresponding to the maximum value:
 ```sql
 IoTDB> select max_by(time, a), max_value(a) from root.test
@@ -379,6 +382,7 @@ IoTDB> select max_by(b, a) from root.test group by 
([0,7),4ms) having max_by(b,
 |1970-01-01T08:00:00.004+08:00|                            10.0|
 +-----------------------------+--------------------------------+
 ```
+
 Using with order by clause:
 ```sql
 IoTDB> select max_by(b, a) from root.test group by ([0,7),4ms) order by time 
desc

Reply via email to