I have a table that accepts orders and when they are placed the current time is also inserted using the time() function, what I need to do is group the orders by time. For instance if the orders are placed at 12 01 and 12 02 and 12 03 I need to group them together and count the group of orders as 1. I was trying to use;
select TimeOrdered from orders where
Where TimeOrdered between Time() and Time() + 5
groupby TimeOrdered;
but it doesn't work.
Can anyone help me with the syntax to;
1 return the TimeOrdered between an alotted time as a single entity.
2 Count the grouped orders
All help will be more than appreciated.
select TimeOrdered from orders where
Where TimeOrdered between Time() and Time() + 5
groupby TimeOrdered;
but it doesn't work.
Can anyone help me with the syntax to;
1 return the TimeOrdered between an alotted time as a single entity.
2 Count the grouped orders
All help will be more than appreciated.