P
Paul Carruthers
I have a database which contains sales. Each record is a sale by a customer
on a particular date. The sales table lists the records from oldest to newest.
I am wondering if there is a query I could use where if I typed in a date
range such as 11/05/04 - 11/06/04 it would in turn take each day in the range
and count how many occurances of the date there where in the sales table.
Such as if I typed in occurances between 11/05/04 - 11/06/04 it would list a
report with the following:
11/05/04 - 23 sales that day
12/05/04 - 21 sales that day
etc etc
The name of the table is called
Order and the cell which contains the dates is called Date Ordered. A simple
like.... query works just for looking at one date within the table.
So Far I have been recommended this as my MYSQL query:
SELECT Order.[Date Ordered], Count(*) AS Sales
FROM [Order]
GROUP BY Order.[Date Ordered]
HAVING Order.[Date Ordered] Between #11/05/2004# And #11/06/2004#;
However this does not work.
Can anyone shine any light on this please.
Paul Carruthers
on a particular date. The sales table lists the records from oldest to newest.
I am wondering if there is a query I could use where if I typed in a date
range such as 11/05/04 - 11/06/04 it would in turn take each day in the range
and count how many occurances of the date there where in the sales table.
Such as if I typed in occurances between 11/05/04 - 11/06/04 it would list a
report with the following:
11/05/04 - 23 sales that day
12/05/04 - 21 sales that day
etc etc
The name of the table is called
Order and the cell which contains the dates is called Date Ordered. A simple
like.... query works just for looking at one date within the table.
So Far I have been recommended this as my MYSQL query:
SELECT Order.[Date Ordered], Count(*) AS Sales
FROM [Order]
GROUP BY Order.[Date Ordered]
HAVING Order.[Date Ordered] Between #11/05/2004# And #11/06/2004#;
However this does not work.
Can anyone shine any light on this please.
Paul Carruthers