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
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.