Link to home
Create AccountLog in
Avatar of ewang1205
ewang1205

asked on

query question to add value of two rows together

I like to have a query to add all the type A+B salary together for each yr_mon.  Help me on the query please.  Thanks.

Here is the table data.
yr_mon      type  salary      
2008_01      A           100      
2008_01      B            200    
2008_02      A            300      
2008_02      B            400      
2008_02      C            500      

Here is my result data.  
yr_mon        salary      
2008_01                 300      
2008_02               700      
SOLUTION
Avatar of chapmandew
chapmandew
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.