问题表
col1 col2 col3 col4
1 null a null
1 b null null
1 null null c
2 aa null null
2 null bb null
需要输出
col1 col2 col3 col4
1 b a c
2 aa bb null
请帮忙进行 SQL 查询
我想删除空值并合并单行中的列
你只需要
group by
select
col1
max(col2) col2,
max(col3) col3,
max(col4) col4
from Issue
group by col1