D
Dawn
There are two table ,
Table1: name ,city ,salary,
Table2:city, province
Query1:SELECT table1.name,table1,city, Sum(table1.[salary]) as
sumofsalryofperson
FROM table1
GROUP BY table1.[ name], table1.[ city];
Query2: SELECT Table2.[ province], Sum(Query1.[sumofsalryofperson])
FROM Table2 INNER JOIN Query1 ON Table2.[city] = Query1.[city]
GROUP BY Table2.[province];
Is there anyway to combine above two queries into one?
Many thanks
Table1: name ,city ,salary,
Table2:city, province
Query1:SELECT table1.name,table1,city, Sum(table1.[salary]) as
sumofsalryofperson
FROM table1
GROUP BY table1.[ name], table1.[ city];
Query2: SELECT Table2.[ province], Sum(Query1.[sumofsalryofperson])
FROM Table2 INNER JOIN Query1 ON Table2.[city] = Query1.[city]
GROUP BY Table2.[province];
Is there anyway to combine above two queries into one?
Many thanks