I have a query that I run monthly, how do I modify it to work for a quarterly report?
Posted on 2005-04-19
The query I use now for the monthly report involves four tables that all have equal joins. This is what the query looks like:
field 1: InvoiceGroup from table Invoice
filed 2: BillingGroup from table BillingGroup
field 3: CustomerAccountNumber from table Customer
field 4: CustomerName from table Customer
field 5: InvoiceDate from table Invoice
field 6: DetailTypeID from table InvoiceDetail
filed 7: Amount from table InvoiceDetail
Basically, I put in a date range in InvoiceDate to find the invoice date for the month I want and it pulls up the top 25 customers based on Amount. How can I modify this query to create a quarterly query (or report) that will sum three months of Amount for each customer and then give me the top 25?
Because this seems like a difficult question to me, and I need it fairly soon, I'm going to make it worth 400 points!