Skip to content

GROUP_CONCAT isn't fully supported #2413

Closed

Description

@4skinSkywalker

I'm testing the following operation on my app

SELECT GROUP_CONCAT(
    DISTINCT country  
    ORDER BY country ASC SEPARATOR ';'
) as countries
FROM diary;

and it leads to an error: error: Parse error on line 4: ...TINCT country ORDER BY country AS ----------------------^ Expecting 'EOF', 'COMMA', 'RPAR', 'IN', 'LIKE', 'ARROW', 'DOT', 'CARET', 'EQ', 'SLASH', 'EXCLAMATION', 'MODULO', 'GT', 'LT', 'GTGT', 'LTLT', 'NOT', 'AND', 'OR', 'PLUS', 'STAR', 'RBRA', 'END', 'ELSE', 'REGEXP', 'TILDA', 'GLOB', 'NOT_LIKE', 'BARBAR', 'MINUS', 'AMPERSAND', 'BAR', 'GE', 'LE', 'EQEQ', 'EQEQEQ', 'NE', 'NEEQEQ', 'NEEQEQEQ', 'BETWEEN', 'NOT_BETWEEN', 'IS', 'DOUBLECOLON', 'GO', 'SEMICOLON', got 'ORDER'

Do you plan supporting it?

P.S.: In the meanwhile I've solved it by using

SELECT REPLACE(GROUP_CONCAT(country), ',', ';') AS countries
FROM (
    SELECT DISTINCT country
    FROM diary
    ORDER BY country
);

Activity

  1. added a commit that references this issue on Jan 4, 2026
    c6b6e20
  2. mathiasrw commented on Jan 8, 2026

    @mathiasrw
    Member

    A fix to this has been released as part of v4.17.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions