Bringing Multiple Queries Together in One Query

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.
 
K

Ken Snell \(MVP\)

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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top