hi there,
I need to query a sales table and have the resulting table show the breakdown for different time periods within the given day.
For example, the table has the following fields:
Id (int), EntryDate (datetime), SaleReference (varchar)
I'd like to produce a table that looks like this:
Date Sales 9am-12pm Sales 12pm-3pm Sales 6pm-9pm ---------- -------------- -------------- ------------- 01-01-2010 10 20 6 02-01-2010 12 16 3 03-01-2010 43 11 2
Any help on this would be greatly appreciated. Thanks