提问人:rania 提问时间:1/12/2023 更新时间:1/12/2023 访问量:43
我是否可以将与同一 ID 相关的行分组以删除空值并将所有相关数据放在同一行中?
could I group rows related to the same id to remove nulls and put all related data in the same row?
答:
0赞
RF1991
1/12/2023
#1
聚合函数(如 )可以很好地处理它们,并且可以轻松屏蔽它们。使用以下查询Max
string_agg
null values
select
max(seq) seq,
max(code) code,
max(codeType) codeType,
max(codeDesc) codeDesc,
max(number) number
from
yourtable
评论