Help Center/
MapReduce Service/
Component Operation Guide (LTS)/
Using HetuEngine/
Common HetuEngine SQL Syntax/
DQL Syntax/
HAVING
Updated on 2024-10-25 GMT+08:00
HAVING
HAVING
HAVING is used with aggregate functions and GROUP BY to control which groups are selected. HAVING filters out groups that do not meet specified conditions after grouping and aggregation calculation.
Example:
SELECT count(*), mktsegment, nationkey, CAST(sum(acctbal) AS bigint) AS totalbal FROM customer GROUP BY mktsegment, nationkey HAVING sum(acctbal) > 5700000 ORDER BY totalbal DESC;
Parent topic: DQL 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