Table:
32 Resolve 2010-05-31 13:05:32.000 balaji Resolved NULL
32 Update 2010-05-31 12:00:36.000 service progress balaji
32 Update 2010-05-28 16:07:26.000 Nithya Pending NULL
32 Opeen 2010-05-28 14:37:05.000 service progress gowri
1)32 is incident no
2)next column istype
3)Datestamp
4)Operator
5)problem_status
6)assignee_name
need to calculate the total miutes and hours,days
in the table
id open by operator, and assigned to assignee_name column
first the problem_status is progress at datestamp 2010-05-28 14:37:05.000
and then the assignee_name mark as pending at 2010-05-28 16:07:26.000
then the operator open the id at 2010-05-31 12:00:36.000 assigned to assignee_name assignee resolved at 2010-05-31 13:05:32.000
i need to calculate total min and hours with reference to problem status and datestamp
so
from 2010-05-28 14:37:05.000 to 2010-05-28 16:07:26.000 problem_status is progress
from 2010-05-28 14:37:05.000 to 2010-05-31 12:00:36.000 is pending and from 2010-05-31 12:00:36.000 to 2010-05-31 13:05:32.000 progress
finally i need to get total progress minutes,hours and pending min,hours
note

roblem _status column varies so we cannot give where condition
ie where problem_status='pending'