mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
after review fixes:
allowed parsing of table fields inside aggregate functions added new tests of fields resolving in grouping
This commit is contained in:
@@ -285,6 +285,15 @@ insert into t2 values (1, 5), (2, 4), (3, 3), (3,3);
|
||||
select group_concat(c) from t1;
|
||||
group_concat(c)
|
||||
2,3,4,5
|
||||
select group_concat(c order by (select c from t2 where t2.a=t1.a limit 1)) as grp from t1;
|
||||
grp
|
||||
5,4,3,2
|
||||
select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a)) as grp from t1;
|
||||
grp
|
||||
5,4,3,2
|
||||
select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a) desc) as grp from t1;
|
||||
grp
|
||||
2,4,3,5
|
||||
select t1.a, group_concat(c order by (select c from t2 where t2.a=t1.a limit 1)) as grp from t1 group by 1;
|
||||
a grp
|
||||
1 2
|
||||
|
||||
Reference in New Issue
Block a user