I have two tables:
MAIN
-quotenumber
-quoteamount
REVISIONS
-quotenumber
-revisionnumber
-quoteamount
I want to get a total sum of quote amounts for each quote number from both tables grouped by quote number
i.e.
MAIN
00012 $100
00013 $45
00014 $90
REVISIONS
00012 REVA $50
00012 REVB $30
00012 REVC $10
00013 REVA $80
00013 REVB $60
00014 REVA $20
00015 REVB $10
I'd like the query to return:
00012 $190
00013 $185
00014 $120
I have tried various joins but with no success..
Any help is appreciated..
MAIN
-quotenumber
-quoteamount
REVISIONS
-quotenumber
-revisionnumber
-quoteamount
I want to get a total sum of quote amounts for each quote number from both tables grouped by quote number
i.e.
MAIN
00012 $100
00013 $45
00014 $90
REVISIONS
00012 REVA $50
00012 REVB $30
00012 REVC $10
00013 REVA $80
00013 REVB $60
00014 REVA $20
00015 REVB $10
I'd like the query to return:
00012 $190
00013 $185
00014 $120
I have tried various joins but with no success..
Any help is appreciated..