select X.Location, MAX(IIF(A.Price IS NULL,0, A.Price)) as PricesA, MAX(IIF(B.Price IS NULL,0, B.Price)) as PricesB, MAX(Nz(A.Price,0) - NZ(B.Price,0)) as PricesDiff from ((select A.Location from TablesA A UNION SELECT B.Location from TablesB B) X LEFT JOIN TableA A on X.Location = A.Location) LEFT JOIN TableB B on X.Location = B.Location GROUP BY X.Locationor alternatively
select X.Location, MAX(IIF(A.Price IS NULL,0, A.Price)) as PricesA, MAX(IIF(B.Price IS NULL,0, B.Price)) as PricesB, MAX(Nz(A.Price,0) - NZ(B.Price,0)) as PricesDiff from ( (select Location from A UNION all select Location from B) X LEFT JOIN A on X.Location = A.Location) LEFT JOIN B on X.Location = B.Location GROUP BY X.Locationsuggested by someone proficient in Access.