现有表名字为table1,表中有两列,a1,b1,现在需要把a1中相同的合并,对应的b1的值相加求和,问sql怎么处理,oracle数据库
select a1,sum(b1) as b1 from biao group by a1
select a,sum(b) from table
group by a
select a1,sum(b1)zs from table1 group by a1