group_concat 什么时候可以支持Distinct 和 order by 一起用?

Viewed 35

ERROR 1105 (HY000): errCode = 2, detailMessage = group_concat don't support using distinct with order by together: group_concat(DISTINCT X.xxxx ORDER BY X.xxxx ASC, ',' ASC)

1 Answers

如果需要同时实现去重和排序的功能,当前可能需要考虑其它替代方案或使用多个查询步骤来完成。