Help Center/
GaussDB(DWS)/
Tool Guide/
DSC/
MySQL Syntax Migrating/
Data Manipulation Language (DML)/
ROLLUP
Updated on 2024-12-09 GMT+08:00
ROLLUP
group by column with rollup in MySQL needs to be converted to group by rollup (column) in GaussDB(DWS).
Input
1 2 3 |
select id,product_id,count(1) from czb_account.equity_account_log where id in (6957343,6957397,6957519,6957541,6957719) group by 1, 2 with rollup; |
Output
1 2 3 4 5 6 7 8 9 10 |
SELECT id, product_id, count(1) FROM czb_account.equity_account_log WHERE id IN (6957343, 6957397, 6957519, 6957541, 6957719) GROUP BY ROLLUP(1, 2); |
Parent topic: Data Manipulation Language (DML)
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