I need to determine start and end dates from the following data set:
item date cost
12345 01/01/15 2.00
12345 01/02/15 2.00
12345 01/03/15 2.00
12345 01/04/15 2.00
12345 01/05/15 2.00
12345 01/06/15 2.00
12345 01/07/15 1.50
12345 01/08/15 1.50
12345 01/09/15 1.50
12345 01/10/15 1.50
12345 01/11/15 1.50
12345 01/12/15 1.50
12345 01/13/15 1.50
12345 01/14/15 2.00
12345 01/15/15 2.00
12345 01/16/15 2.00
12345 01/17/15 2.00
12345 01/18/15 2.00
12345 01/19/15 2.00
12345 01/20/15 2.00
12345 01/26/15 2.00
12345 01/27/15 2.00
12345 01/28/15 2.00
12345 01/29/15 2.00
If possible, what I want is the following output:
item start end cost
12345 01/01/15 01/06/15 2.00
12345 01/07/15 01/13/15 1.50
12345 01/14/15 01/20/15 2.00
12345 01/26/15 01/29/15 2.00
Basically, any time the changes, or there is more than a 4 day gap between the dates at any given cost.
Thanks.