Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9c356bf4
Commit
9c356bf4
authored
Jan 29, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After merge fix
parent
93ebd4d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
mysql-test/r/group_by.result
mysql-test/r/group_by.result
+17
-0
No files found.
mysql-test/r/group_by.result
View file @
9c356bf4
...
@@ -529,21 +529,38 @@ table type possible_keys key key_len ref rows Extra
...
@@ -529,21 +529,38 @@ table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 6 Using temporary
t1 ALL NULL NULL NULL NULL 6 Using temporary
t2 ALL a NULL NULL NULL 4 Using where
t2 ALL a NULL NULL NULL 4 Using where
drop table t1,t2;
drop table t1,t2;
create table t1 (a int, b int);
insert into t1 values (1, 4);
insert into t1 values (10, 40);
insert into t1 values (1, 4);
insert into t1 values (10, 43);
insert into t1 values (1, 4);
insert into t1 values (10, 41);
insert into t1 values (1, 4);
insert into t1 values (10, 43);
insert into t1 values (1, 4);
select a, MAX(b), INTERVAL (MAX(b), 1,3,10,30,39,40,50,60,100,1000) from t1 group by a;
a MAX(b) INTERVAL (MAX(b), 1,3,10,30,39,40,50,60,100,1000)
a MAX(b) INTERVAL (MAX(b), 1,3,10,30,39,40,50,60,100,1000)
1 4 2
1 4 2
10 43 6
10 43 6
select a, MAX(b), CASE MAX(b) when 4 then 4 when 43 then 43 else 0 end from t1 group by a;
a MAX(b) CASE MAX(b) when 4 then 4 when 43 then 43 else 0 end
a MAX(b) CASE MAX(b) when 4 then 4 when 43 then 43 else 0 end
1 4 4
1 4 4
10 43 43
10 43 43
select a, MAX(b), FIELD(MAX(b), '43', '4', '5') from t1 group by a;
a MAX(b) FIELD(MAX(b), '43', '4', '5')
a MAX(b) FIELD(MAX(b), '43', '4', '5')
1 4 2
1 4 2
10 43 1
10 43 1
select a, MAX(b), CONCAT_WS(MAX(b), '43', '4', '5') from t1 group by a;
a MAX(b) CONCAT_WS(MAX(b), '43', '4', '5')
a MAX(b) CONCAT_WS(MAX(b), '43', '4', '5')
1 4 434445
1 4 434445
10 43 43434435
10 43 43434435
select a, MAX(b), ELT(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f') from t1 group by a;
a MAX(b) ELT(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f')
a MAX(b) ELT(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f')
1 4 d
1 4 d
10 43 NULL
10 43 NULL
select a, MAX(b), MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') from t1 group by a;
a MAX(b) MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h')
a MAX(b) MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h')
1 4 c
1 4 c
10 43 a,b,d,f
10 43 a,b,d,f
drop table t1;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment