Attached a cut down version of my database.
I want to monitor the time taken that a job is left open at a certain status (who is assigned to job).
All jobs should begin with a Status of 1, and End with a status of 8. In between the job could go through different status's multiple times. So i have been asked can i run a query that shows how long a job is at a certain status (For example status 2) So i have a query that brings back the Min time the status was changed to 2, but don't know how to write the query that shows when it was changed from 2 to 3 or 4 etc.
Any help appreciated.
I want to monitor the time taken that a job is left open at a certain status (who is assigned to job).
All jobs should begin with a Status of 1, and End with a status of 8. In between the job could go through different status's multiple times. So i have been asked can i run a query that shows how long a job is at a certain status (For example status 2) So i have a query that brings back the Min time the status was changed to 2, but don't know how to write the query that shows when it was changed from 2 to 3 or 4 etc.
Any help appreciated.