Hey there,
Im having a problem with this query, I have one table that holds all user records, then I have other tables that have a log of all deposits they made on a website in a month. I want the query to total these deposits and return the total for each month next to the USERS ID. Now this works fine when I do it for one month, but if I had other month tables, the totals go all over the place,
Here is the query...
SELECT Deposit_Users.USER_ID,
Sum(Sept1.Total) AS Sept,
Sum(Aug1.Total) AS Aug
FROM (Deposit_Users LEFT JOIN Sept1 ON Deposit_Users.USER_ID = Sept1.[User Id]) LEFT JOIN Aug1 ON Deposit_Users.USER_ID = Aug1.[User Id]
GROUP BY USER_ID;
I need to make the query ONLY return the sum of all deposits on an individual month basis, it seems to be totaling everything or something for each column.
Any help on this would be much appreciated.
Thanks.
Im having a problem with this query, I have one table that holds all user records, then I have other tables that have a log of all deposits they made on a website in a month. I want the query to total these deposits and return the total for each month next to the USERS ID. Now this works fine when I do it for one month, but if I had other month tables, the totals go all over the place,
Here is the query...
SELECT Deposit_Users.USER_ID,
Sum(Sept1.Total) AS Sept,
Sum(Aug1.Total) AS Aug
FROM (Deposit_Users LEFT JOIN Sept1 ON Deposit_Users.USER_ID = Sept1.[User Id]) LEFT JOIN Aug1 ON Deposit_Users.USER_ID = Aug1.[User Id]
GROUP BY USER_ID;
I need to make the query ONLY return the sum of all deposits on an individual month basis, it seems to be totaling everything or something for each column.
Any help on this would be much appreciated.
Thanks.