Bug #82616 implement LIMIT N in GROUP_CONCAT
Submitted: 17 Aug 2016 14:57 Modified: 18 Aug 2016 10:04
Reporter: Mikhail Izioumtchenko (OCA) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DML Severity:S4 (Feature request)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any

[17 Aug 2016 14:57] Mikhail Izioumtchenko
Description:
GROUP_CONCAT supports ORDER BY and DISTINCT but not LIMIT clause.
Supporting LIMIT N[,M] could simplify queries, avoid passing lots of data to the client and may be optimized on the server side by not extracting complete GROUP BY ... ORDER BY result.
Example:

something like

SUBSTRING_INDEX(GROUP_CONCAT(CONCAT_WS(":",date,cnt) ORDER BY cnt DESC),",",1)

could be written as

GROUP_CONCAT(CONCAT_WS(":",date,cnt) ORDER BY cnt DESC LIMIT 1)

How to repeat:
see above
[18 Aug 2016 5:35] MySQL Verification Team
Hello Mikhail,

Thank you for the feature request!
This is duplicate of Bug #71467.

Thanks,
Umesh