- 行轉列
select max(ubi.key), concat_ws(',', collect_set(ua.number)) as number from user_basic_info ubi
example
key number
a 1
a 2
b 1
convert to
a 1,2
b 1
select max(ubi.key), concat_ws(',', collect_set(ua.number)) as number from user_basic_info ubi
example
key number
a 1
a 2
b 1
convert to
a 1,2
b 1