通过group by 和聚合函数group_concat实现:state字段包含多个类型值,每个point_id都有不同数量的state。
group_concat(distinct e.state order by e.state) as state
GROUP BY s.point_id
mysql行转列去重拼接
最新推荐文章于 2024-07-02 17:40:08 发布
通过group by 和聚合函数group_concat实现:state字段包含多个类型值,每个point_id都有不同数量的state。
group_concat(distinct e.state order by e.state) as state
GROUP BY s.point_id