I have two queries
1)
select Year , Month, Sum(Stores) from ABC ;
2)
select Year, Month , Sum(SalesStores) from DEF ;
I want a result like :
**Year, Month , Sum(Stores), Sum(SalesStores)**
How can I do it ?
I tried union & Union all
select Year , Month, Sum(Stores) from ABC union
select Year, Month , Sum(SalesStores) from DEF ;
I see only 3 columns in the output
Year, Month Sum(Stores).
Here are the tables :
Year, Month Stores
Year Month SalesStores
Is there a way I can see the result in the format I would like to see ?
ABCandDEFlinked via foreign key? - Tim Schmelter