-
thought this was an interesting question, figured I'd try my hand:
SELECT AVG(TO_DAYS(b.date)-TO_DAYS(a.date)) FROM applicant_tracking a JOIN applicant_tracking b ON a.applicant_id = b.applicant_id AND a.status_id = b.status_id-1;
This should give you overall average step-to-step duration. For explicit steps, just remove the 'AND a.status_id=b.status_id-1' and add a where clause specifying the first step in table a and the second step in table b (e.g. 'WHERE a.status_id = 1 AND b.status_id = 2'). this way you can also find average days difference between say steps 1 and 3 or steps 2 and 5.
HTH
thanx:barry
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|