How do I word a query for the following:
I want to know how many orders a particular customer has ordered of a certain product for any 30 day period (or month) last year, so I can see if their orders are lower or higher than this year.
I have a database called “mydatabase”
The main table is called “ordering”
the fields I have are:
customerid (name of company)
ordernumber (automatically incremented)
orderdate (date they ordered it)
orderedby (salesman)
duedate (due to them)
ProdA
ProdB
ProdC
I have Mysql version 4.0.18 and it comes with a program called “MysqlTool” version .95
I’m new to Mysql, and only know some simple “select” queries.
Thanks for any help.