sql多条数据合并,如图这种情况如何把6条数据合并到一行

2025-05-09 00:07:08
推荐回答(1个)
回答1:

select sum(case when wgrp_id='2' then quota end) w2, sum(case when wgrp_id='3' then quota end) w3, mm
from table
group by mm