Bringing Multiple Queries Together in One Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have three queries that have pulled data from one table and summed specific
data. The three queries are named "Total Wires", "Total Journals" and "Total
P&I". I'd like to pull this into one query with the account name in the
first field, followed by the three totals mentioned above in no particular
order. I'm kind of new at this so I've been throwing darts at a board with
no luck.

Thanks.
 
Assuming that you have a field named AccountName in all three queries:

SELECT T.AccountName, T1.TotalWiresField,
T2.TotalJournalsField, T3.TotalPIField
FROM ((TheFirstTableOfData AS T LEFT JOIN [Total Wires] AS T1
ON T.AccountName = T1.AccountName)
LEFT JOIN [Total Journals] AS T2
ON T.AccountName = T2.AccountName)
LEFT JOIN [Total P&I] AS T3
ON T.AccountName = T3.AccountName
ORDER BY T.AccountName;
 
Back
Top