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
Oracle DatabaseMySQL ServerMicrosoft SQL Server

Avatar of undefined
Last Comment
slightwv (䄆 Netminder)

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
slightwv (䄆 Netminder)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
awking00

Looks pretty straight forward to me :-)
fniazi4u

looks quite simple,

select sum(b), a from table_name group by a
slightwv (䄆 Netminder)

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.
Your help has saved me hundreds of hours of internet surfing.
fblack61