Presto/hive 一行转多行,多行合并成一行
presto-多行变一行
with t(id,a) as(
select '1','a' union all
select '2','c' union all
select '2','d' )
select id,array_join(array_agg(a), ',') from t
group by id
array_agg将数据整合起来变成一个列表,array_join将列表以指定分隔符连接起来
侠义非凡的硬盘 · 世优科技AI数字人180+面部控制参数,雕琢 ...· 3 月前 · |
跑龙套的沙滩裤 · python 使用shutil.copy ...· 5 月前 · |
不羁的投影仪 · 完全代替Wii!模拟器体感手柄设置教程-泡泡网· 5 月前 · |
发财的茶叶 · InnoDB中undo日志的组织及实现 - 知乎· 1 年前 · |
坚强的山楂 · 经纬度地址转换的方法集合(Python描述) ...· 1 年前 · |