Closed pengtao211 closed 2 months ago
This is not supported. You can do it another way
This is not supported. You can do it another way
What is the other way?
like this:
CREATE TABLE test_GROUP_CONCAT(
value varchar(10)
)ENGINE=OLAP
DISTRIBUTED BY HASH(value
)
PROPERTIES
(
"replication_num" = "1"
);
INSERT INTO test_GROUP_CONCAT (value) VALUES ('a'), ('b'), ('c'), ('c');
select GROUP_CONCAT( value
ORDER BY value
ASC) from
(
select distinct value
from test_GROUP_CONCAT
) a ;
group_concat can be converted to ARRAY_JOIN, ARRAY_SORT, COLLECT_SET/COLLECT_LIST combinations.
like this:
group_concat can be converted to ARRAY_JOIN, ARRAY_SORT, COLLECT_SET/COLLECT_LIST combinations.
like this:
![]()
thank
Search before asking
Version
2.0.1
What's Wrong?
1105 - errCode = 2, detailMessage = group_concat don't support using distinct with order by together: group_concat(DISTINCT
time
ORDER BYtime
ASC)What You Expected?
I hope the group_concat support using distinct with order by together
How to Reproduce?
SELECT day, GROUP_CONCAT(distinct time ORDER BY time) FROM ( SELECT 'Monday' day, '15:00-21:00' time UNION ALL SELECT 'Monday' day, '09:00-13:00' time UNION ALL SELECT 'Monday' day, '09:00-13:00' time ) tab GROUP BY day
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct