Files
doris/docs/en/sql-reference/sql-functions/aggregate-functions/group_concat.md
Pxl 1943a5da5f [docs] fix some document error and adjust some function document location
1. move `group_concat` from string-functions to aggregate-functions.
2. add `json_array`/`json_object`/`json_quote` to sidebar file.
3. move  `json_array`/`json_object`/`json_quote`/`get_json_double`/`get_json_int`/`get_json_string` to json-functions.
4.  change `group_concat` document to uppercase
2022-02-19 11:59:55 +08:00

1.7 KiB

title, language
title language
GROUP_CONCAT en

group_concat

description

Syntax

VARCHAR GROUP_CONCAT(VARCHAR str[, VARCHAR sep])

This function is an aggregation function similar to sum (), and group_concat links multiple rows of results in the result set to a string. The second parameter, sep, is a connection symbol between strings, which can be omitted. This function usually needs to be used with group by statements.

example

mysql> select value from test;
+-------+
| value |
+-------+
| a     |
| b     |
| c     |
+-------+

mysql> select GROUP_CONCAT(value) from test;
+-----------------------+
| GROUP_CONCAT(`value`) |
+-----------------------+
| a, b, c               |
+-----------------------+

mysql> select GROUP_CONCAT(value, " ") from test;
+----------------------------+
| GROUP_CONCAT(`value`, ' ') |
+----------------------------+
| a b c                      |
+----------------------------+

keyword

GROUP_CONCAT,GROUP,CONCAT