Past 12 Months

S

ShrekUT

I would like to have a query that shown Sales for the past 12 months
The table is named ARH the fields are InvoiceDate, Subtotal, an
CustomerNo. This query will be used in a chart.

Thank you..
 
S

ShrekUT

Never mind! The below seems to work just fine... BUT any othe
methods/approches would be intersting.
SELECT ARH.CUSTOMER, ARH.INVOICEDATE, ARH.TAXES, ARH.ADJUST
ARH.FREIGHT, ARH.SUBTOTAL, ARH.TAXES+[ADJUST]+[FREIGHT]+[SUBTOTAL] A
Total
FROM ARH
WHER
(((ARH.INVOICEDATE)>=DateSerial(Year(Date()),Month(Date())-12,Day(Date())
And (ARH.DATE)<=INVOICEDate()))
ORDER BY ARH.DATE
 
S

ShrekUT

Never mind! The below seems to work just fine... BUT any othe
methods/approches would be intersting.
SELECT ARH.CUSTOMER, ARH.INVOICEDATE, ARH.TAXES, ARH.ADJUST
ARH.FREIGHT, ARH.SUBTOTAL, ARH.TAXES+[ADJUST]+[FREIGHT]+[SUBTOTAL] A
Total
FROM ARH
WHER
(((ARH.INVOICEDATE)>=DateSerial(Year(Date()),Month(Date())-12,Day(Date())
And (ARH.DATE)<=INVOICEDate()))
ORDER BY ARH.DATE
 

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