Help Center/
Log Tank Service/
User Guide/
Log Search and Analysis/
SQL Analysis Syntax/
Extrema Function
Updated on 2024-09-19 GMT+08:00
Extrema Function
Description
Extrema functions return the maximum or minimum value after evaluating zero or more specified fields. For details, see Table 1.
Pay attention to the following points when using the extrema functions:
- If no field is set, null is returned. Fields must be able to be converted to common data types.
- If all fields are null, null is returned. If only some fields are null, these fields will be ignored.
- If a field contains both numbers and strings, the function compares them as strings.
- If all columns are integers, the function compares them as long values.
- If all fields are numbers and at least one is a float value, the function compares them as float values.
Syntax
SELECT GREATEST(fieldname1,fieldname2) AS the_greatest_field
Extrema Function Statements
Parent topic: SQL Analysis Syntax
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot