I'm trying to structure a query that will let me get the sum and group by a time period.
Table has Account Number, Amount Purchased, Fiscal Year, Fiscal Period, Fiscal Week, and Date. It also has a few more fields, but these are the ones I'm concerned with.
When I run it, it returns a row for each Date. I'm wanting it to return a total for each Fiscal Period.
I'd appreciate someone pointing me in the right direction.
Rob
Just my $.02.
Table has Account Number, Amount Purchased, Fiscal Year, Fiscal Period, Fiscal Week, and Date. It also has a few more fields, but these are the ones I'm concerned with.
Code:
SELECT DISTINCT Accounts.FscPeriodID, Sum(Accounts.AmountPurchased) AS SumOfAccounts, FROM AcctTable WHERE (((Accounts.AcctNo)="1241113") And ((Accounts.FscYearID)=2013))
GROUP BY Accounts.FscPeriodID, ORDER BY Accounts.FscPeriodID;
When I run it, it returns a row for each Date. I'm wanting it to return a total for each Fiscal Period.
I'd appreciate someone pointing me in the right direction.
Rob
Just my $.02.