diff --git a/src/core_functions/aggregate/distributive/functions.json b/src/core_functions/aggregate/distributive/functions.json index 590fb622be27..6a31c152bdd5 100644 --- a/src/core_functions/aggregate/distributive/functions.json +++ b/src/core_functions/aggregate/distributive/functions.json @@ -120,7 +120,7 @@ "description": "Concatenates the column string values with an optional separator.", "example": "string_agg(A, '-')", "type": "aggregate_function_set", - "aliases": ["group_concat"] + "aliases": ["group_concat","listagg"] }, { "name": "sum", diff --git a/src/core_functions/function_list.cpp b/src/core_functions/function_list.cpp index 9e9ef0483205..72d987a153b4 100644 --- a/src/core_functions/function_list.cpp +++ b/src/core_functions/function_list.cpp @@ -213,6 +213,7 @@ static StaticFunctionDefinition internal_functions[] = { DUCKDB_SCALAR_FUNCTION(ListTransformFun), DUCKDB_SCALAR_FUNCTION(ListUniqueFun), DUCKDB_SCALAR_FUNCTION(ListValueFun), + DUCKDB_AGGREGATE_FUNCTION_SET_ALIAS(ListaggFun), DUCKDB_SCALAR_FUNCTION(LnFun), DUCKDB_SCALAR_FUNCTION_ALIAS(LogFun), DUCKDB_SCALAR_FUNCTION(Log10Fun), diff --git a/src/include/duckdb/core_functions/aggregate/distributive_functions.hpp b/src/include/duckdb/core_functions/aggregate/distributive_functions.hpp index a454620a9f23..6a918578826c 100644 --- a/src/include/duckdb/core_functions/aggregate/distributive_functions.hpp +++ b/src/include/duckdb/core_functions/aggregate/distributive_functions.hpp @@ -210,6 +210,12 @@ struct GroupConcatFun { static constexpr const char *Name = "group_concat"; }; +struct ListaggFun { + using ALIAS = StringAggFun; + + static constexpr const char *Name = "listagg"; +}; + struct SumFun { static constexpr const char *Name = "sum"; static constexpr const char *Parameters = "arg";