Hello,
I am looking to have a query total two different fields from two different queries and then subtract one from the other, its working when query 2 has data ..
SELECT Q1.[Postcode Area], [Q1].[PR1]+[Q1].[Non_PR1] AS Q1_Total, [Q2].[PR1]+[Q2].[Non_PR1] AS Q2_Total, [Q1_TOTAL]-[Q2_TOTAL] AS Q3
FROM Q1 LEFT JOIN Q2 ON Q1.[Postcode Area] = Q2.[Postcode Area];
Looking for this output, any ideas pls?
I am looking to have a query total two different fields from two different queries and then subtract one from the other, its working when query 2 has data ..
SELECT Q1.[Postcode Area], [Q1].[PR1]+[Q1].[Non_PR1] AS Q1_Total, [Q2].[PR1]+[Q2].[Non_PR1] AS Q2_Total, [Q1_TOTAL]-[Q2_TOTAL] AS Q3
FROM Q1 LEFT JOIN Q2 ON Q1.[Postcode Area] = Q2.[Postcode Area];
Postcode Area | Q1_Total | Q2_Total | Q3 |
G | 83 | ||
GL | 75 | 2 | 73 |
GU | 34 |
Looking for this output, any ideas pls?
Postcode Area | Q1_Total | Q2_Total | Q3 |
G | 83 | 83 | |
GL | 75 | 2 | 73 |
GU | 34 | 34 |