Link to home
Start Free TrialLog in
Avatar of mikensu12
mikensu12

asked on

sum by grouping Oracle

a           b    
608679      750
608679      1825
616953      750
616953      1825
620101      0
620101      250

so the sum should be

sum(b)        a
2575         608679
2575         616953  
250           620101
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Looks pretty straight forward to me :-)
Avatar of fniazi4u
fniazi4u

looks quite simple,

select sum(b), a from table_name group by a
fniazi4u,

Please read previous posts before posting.  I don't see anything in your post that I didn't already post 3 hours before yours.