summaryrefslogtreecommitdiff
path: root/mysql-test/r/olap.result
blob: 428d1052d19dac3aec039f1f8aa4bb5ab851fe91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
drop table if exists t1;
create table t1 ( product varchar(32), country varchar(32), year int, profit int);
insert into t1  values ( 'Computer', 'India',2000, 1200),
( 'TV', 'United States', 1999, 150),
( 'Calculator', 'United States', 1999,50),
( 'Computer', 'United States', 1999,1500),
( 'Computer', 'United States', 2000,1500),
( 'TV', 'United States', 2000, 150),
( 'TV', 'India', 2000, 100),
( 'TV', 'India', 2000, 100),
( 'Calculator', 'United States', 2000,75),
( 'Calculator', 'India', 2000,75),
( 'TV', 'India', 1999, 100),
( 'Computer', 'India', 1999,1200),
( 'Computer', 'United States', 2000,1500),
( 'Calculator', 'United States', 2000,75);
select product, country , year, sum(profit) from t1 group by product, country, year with cube;
This version of MySQL doesn't yet support 'CUBE'
explain select product, country , year, sum(profit) from t1 group by product, country, year with cube;
This version of MySQL doesn't yet support 'CUBE'
select product, country , year, sum(profit) from t1 group by product, country, year with rollup;
This version of MySQL doesn't yet support 'ROLLUP'
explain select product, country , year, sum(profit) from t1 group by product, country, year with rollup;
This version of MySQL doesn't yet support 'ROLLUP'
select product, country , year, sum(profit) from t1 group by product, country, year with cube union all select product, country , year, sum(profit) from t1 group by product, country, year with rollup;
This version of MySQL doesn't yet support 'CUBE'
drop table t1;