Code: Select all
SELECT Accounts.AccountName, Sum(MEtable.MEGoogle) AS Google, Sum(MEtable.MEOverture) AS Overture, Sum(SOtable.SaleAmount) AS SumOfSaleAmount
FROM (Accounts LEFT JOIN MEtable ON Accounts.AccountCode = MEtable.MEAccountID) LEFT JOIN SOtable ON Accounts.AccountCode = SOtable.AccountCode
GROUP BY Accounts.AccountName;Say I had an account "Printers", with $100 in Google Expenses and $200 in revenue in my data tables. It would show $200 in Google Expense and $400 in revenue in my query results. Why is this?
If I haven't made myself clear, please ask for clarification! THanks,
Caleb, at his wits' end.