Hi Experts ,
I know this can be easily achievable but some how I am not able to get this with stats command I have data like below
name,status,date
erp,200,2019-10-01 08:28:33
erp,200,2019-10-01 08:29:33
erp,503,2019-10-01 08:30:33
erp,,2019-10-01 08:31:33
erp,,2019-10-01 08:32:33
erp,503,2019-10-01 08:33:33
erp,200,2019-10-01 08:34:33
erp,200,2019-10-01 08:35:33
erp,200,2019-10-01 08:36:33
I want to show something like below in a table
name from_date to_date status duration
erp 2019-10-01 08:28:33 2019-10-01 08:29:33 200 1 min
erp 2019-10-01 08:30:33 2019-10-01 08:31:33 503 1 min
erp 2019-10-01 08:31:33 2019-10-01 08:32:33 "" 1 min
erp 2019-10-01 08:33:33 2019-10-01 08:36:33 200 4 min
So the idea is to get the duration as per status , if my service has like 503 status for how long that status was .
Any help will be highly appreciated
Regards
VG
↧