Hi friends,
This is my customer table
RecordID Name Stage DOE
1 Jack stage1 05/22/2015
2 Jack stage2 05/24/2015
3 Jack stage3 05/27/2015
4 James stage1 06/10/2015
5 James stage2 06/11/2015
6 James stage3 06/12/2015
7 Jack stage1 6/13/2015
8 Jack stage2 06/13/2015
9 Jack stage3 06/14/2015
From the above dataset, I need to know the number of days the customer took from stage 1 to stage 3
If stage 1 to stage 3 is one process, Jack has two processes so he would show up twice in the result but with different days
Jack 05/22/2015(Stage1 DOE) 05/27/2015(stage3) 5 days
Jack 6/13/2015 6/14/2015 1
James 6/10/2015 6/12/2015 2
How can i write a query to get the result as above...Thank You