56,678
社区成员
发帖
与我相关
我的任务
分享
select id,group_concat(case when value='A' then 'A' end) Value,
group_concat(case when value='B' then 'B' end) Value,
group_concat(case when value='C' then 'C' end) Value
from tb
group by id
select id,
max(if(value='A','A',null)),
max(if(value='B','B',null)),
max(if(value='C','C',null))
from table1
group by id