I am attempting to count the number of times we produce a product, and the average quantity in each production run.
I have the detail by production date, but the issue I can't resolve is how to count production on consecutive days as 1 entry. This is to cover where we begin production late one day, and finish the following day (or even the day after!).
An added complication, is where we start on a Friday, and finish on a Monday.
Can anyone suggest how I could query this data, grouping as described? (the table contains hundreds of products - folowing is an example of one product, but if there is a solution, I'm assuming it will work for all products.)
Product Production Date Quantity
A123456 10/2/06 80
A123456 13/2/06 80
A123456 11/5/06 450
A123456 02/8/06 550
A123456 03/8/06 25
Lines 1 & 2 should be counted as 1 and the quantity = 160
Line 3 should be counted as 1 and the quantity = 450
Lines 4 & 5 should be counted as 1 and the quantity = 575
Hope this makes sense...!
Thanks
Peter (need a wee Dram!)
I have the detail by production date, but the issue I can't resolve is how to count production on consecutive days as 1 entry. This is to cover where we begin production late one day, and finish the following day (or even the day after!).
An added complication, is where we start on a Friday, and finish on a Monday.
Can anyone suggest how I could query this data, grouping as described? (the table contains hundreds of products - folowing is an example of one product, but if there is a solution, I'm assuming it will work for all products.)
Product Production Date Quantity
A123456 10/2/06 80
A123456 13/2/06 80
A123456 11/5/06 450
A123456 02/8/06 550
A123456 03/8/06 25
Lines 1 & 2 should be counted as 1 and the quantity = 160
Line 3 should be counted as 1 and the quantity = 450
Lines 4 & 5 should be counted as 1 and the quantity = 575
Hope this makes sense...!
Thanks
Peter (need a wee Dram!)