diff options
author | unknown <holyfoot/hf@hfmain.(none)> | 2007-05-01 13:38:59 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@hfmain.(none)> | 2007-05-01 13:38:59 +0500 |
commit | 0e20de498a5194cb719ff5234ba49c087bfb14d0 (patch) | |
tree | 0fdd0a4d93bddf62abf4ec4e5202fa8d1df57cb2 /mysql-test/r/olap.result | |
parent | 9be5c10fca989ff9d8efdd2cc12b57c62dcaefb6 (diff) | |
parent | 5352b41d29bf3a0ca37d64acfa61527a4944812d (diff) | |
download | mariadb-git-0e20de498a5194cb719ff5234ba49c087bfb14d0.tar.gz |
Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into mysql.com:/d2/hf/mrg/mysql-5.1-opt
mysql-test/r/olap.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
sql/item_func.h:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'mysql-test/r/olap.result')
-rw-r--r-- | mysql-test/r/olap.result | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result index 66499946b63..f5544b4d115 100644 --- a/mysql-test/r/olap.result +++ b/mysql-test/r/olap.result @@ -607,6 +607,67 @@ x a sum(b) 2006-07-01 NULL 11 NULL NULL 11 drop table t1; +CREATE TABLE t1 (a int, b int); +INSERT INTO t1 +VALUES (2,10),(3,30),(2,40),(1,10),(2,30),(1,20),(2,10); +SELECT a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP; +a SUM(b) +1 30 +2 90 +3 30 +NULL 150 +SELECT DISTINCT a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP; +a SUM(b) +1 30 +2 90 +3 30 +NULL 150 +SELECT a, b, COUNT(*) FROM t1 GROUP BY a,b WITH ROLLUP; +a b COUNT(*) +1 10 1 +1 20 1 +1 NULL 2 +2 10 2 +2 30 1 +2 40 1 +2 NULL 4 +3 30 1 +3 NULL 1 +NULL NULL 7 +SELECT DISTINCT a, b, COUNT(*) FROM t1 GROUP BY a,b WITH ROLLUP; +a b COUNT(*) +1 10 1 +1 20 1 +1 NULL 2 +2 10 2 +2 30 1 +2 40 1 +2 NULL 4 +3 30 1 +3 NULL 1 +NULL NULL 7 +SELECT 'x', a, SUM(b) FROM t1 GROUP BY 1,2 WITH ROLLUP; +x a SUM(b) +x 1 30 +x 2 90 +x 3 30 +x NULL 150 +NULL NULL 150 +SELECT DISTINCT 'x', a, SUM(b) FROM t1 GROUP BY 1,2 WITH ROLLUP; +x a SUM(b) +x 1 30 +x 2 90 +x 3 30 +x NULL 150 +NULL NULL 150 +SELECT DISTINCT 'x', a, SUM(b) FROM t1 GROUP BY 1,2 WITH ROLLUP; +x a SUM(b) +x 1 30 +x 2 90 +x 3 30 +x NULL 150 +NULL NULL 150 +DROP TABLE t1; CREATE TABLE t1(id int, type char(1)); INSERT INTO t1 VALUES (1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"), |