添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
重感情的地瓜  ·  是new image() ...·  1 年前    · 
行走的小摩托  ·  React.createContext ...·  1 年前    · 
呐喊的生姜  ·  SQL查询~ ...·  2 年前    · 
坚强的梨子  ·  c++ 中 char 与 ...·  2 年前    · 
精彩文章免费看

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将列表以指定分隔符连接起来