如何将SQL SERVER一个表中的两条记录合成一条

如题所述

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

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答