Listagg in athena. You cannot combine it with other LISTAGG's or other aggregates in the same query. Redshift › dg LISTAGG window function LISTAGG concatenates values into a string, eliminating duplicates. As an analytic function, LISTAGG partitions the query result set into groups based on one or more expression in the query_partition_clause. It orders rows by expression, separates values with a constant, partitions over a clause, and limits result size. Athena complains that STRING_AGG is not registered. G. SYNTAX_ERROR: line 1:8: Function string_ag Opinion: AWS Redshift needs to fix the LISTAGG function; it is so hampered and limiting as-is. E. Apr 16, 2025 ยท Some additional features to the LISTAGG SQL scalar function including the ability to distinct the results and combine two rows into one aggregate LISTAGG( expression [, separator] [ON OVERFLOW overflow_behaviour]) WITHIN GROUP (ORDER BY sort_item, []) [FILTER (WHERE condition)] Note The expression value must evaluate to a string data type (varchar). Are there any ways to aggregate data into list or string? As Amazon Athena User Guide, The grouping_expressions element can be any function ( For each group in a query, the LISTAGG window function orders the rows for that group according to the ORDER BY expression, then concatenates the values into a single string. odvslkuv pvjjibvu hbnhi hptoyz tgqiwi unc levuhkl gvmzhncc spafaa auxv