I have 2 query’s as below, each return 9 category and year1amount and year2amount.Now i need to subtract table A from table B data, category wise and get a result set .Which shows
9 category and year1amount and year2amount correspondingly.
Sum(MB.Year1Amount) as Year1Amount,
Sum(MB.Year2Amount) as Year2Amount
INNER JOIN [Plan] P
Select 'Table B'
Sum(MPB.Year1Amount) as Year1Amount,
Sum(MPB.Year2Amount) as Year2Amount
Inner join [Plan] P
Order by MPB.CategoryID