1
有two tables (Table1 and Table2)
具有相同的列。将结果结合在两个表中
Customerno, amount
还有第三个表Customers
与列:
Customerno, customername
目前,以下两个查询运行,并使用Excel来源的组合的结果(VLOOKUP等)
Select a.customerno, b.customername, sum(a.amount)
FROM Table1 a join customers b on a.Customerno = b.Customerno
group by a.customerno, b.customername
Select a.customerno, b.customername, sum(a.amount)
FROM Table2 a join customers b on a.Customerno = b.Customerno
group by a.customerno, b.customername
将这两个查询合并为一个以获得所需结果的正确方法是?
谢谢。这有帮助。 – user1955215