- 
                Notifications
    
You must be signed in to change notification settings  - Fork 284
 
Open
Labels
kind/bugSomething isn't workingSomething isn't workingseverity/s0Extreme impact: Cause the application to break down and seriously affect the useExtreme impact: Cause the application to break down and seriously affect the use
Milestone
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
 
Branch Name
main
Commit ID
Other Environment Information
- Hardware parameters:
- OS type:
- Others:Actual Behavior
Expected Behavior
the same as mysql's behavior.
Steps to Reproduce
drop table if exists sales;
create table sales (
year int,
quarter int,
region text,
amount decimal(10, 2)
);
insert into sales (year, quarter, region, amount) values
(2021, 1, 'North', 10000),
(2021, 1, 'South', 15000),
(2021, 2, 'North', 20000),
(2021, 2, 'South', 25000),
(2022, 1, 'North', 30000),
(2022, 1, 'South', 35000),
(2022, 2, 'North', 40000),
(2022, 2, 'South', 45000);
select
    if(grouping(year), 'All years', year) AS year,
    if(grouping(quarter), 'Quarter', quarter) as quarter,
    region,
    sum(amount) as total_sales
from
    sales
group by
    year,
    quarter,
    region with rollup
order by total_sales desc;Additional information
No response
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't workingseverity/s0Extreme impact: Cause the application to break down and seriously affect the useExtreme impact: Cause the application to break down and seriously affect the use