presto sql语法总结
Hive: collect_set 转为数组并去重,concat_ws 将数组用逗号间隔连接成字符串
Presto: array_agg 转为数组,array_distinct 去重,array_join 将数组用逗号间隔连接成字符串
select user_id
, array_join(array_distinct(array_agg(order_id)), ',') as order_ids
from tmp.tmp_row_to_col
where 1 = 1
group by user_i
原创
2022-03-22 18:22:45 ·
5120 阅读 ·
0 评论