我试图计算故障持续时间 我从数据库中得到各列 我已经尝试了多种方法,但最早但没有结果。 我想看看总时间多长的输入
messages_ndx t_stamp Yellow_L38 Yellow_L29a Yellow_L07
1850682 21-10-2019 12:19:41 0 1 0
1850683 21-10-2019 12:20:04 0 1 1
1850684 21-10-2019 12:21:07 1 1 1
1850685 21-10-2019 12:22:05 1 1 0
1850686 21-10-2019 12:22:30 1 0 0
1850687 21-10-2019 12:22:39 0 0 0
1850688 21-10-2019 12:22:43 0 0 1
1850689 21-10-2019 12:22:48 1 0 1
1850690 21-10-2019 12:23:04 1 0 0
1850691 21-10-2019 12:23:38 1 1 0
1850692 21-10-2019 12:23:59 0 1 0
1850693 21-10-2019 12:24:00 0 0 0
结果
messages_ndx Kolumn name Fault time
1850682 Yellow_L29a 00:02:49
1850683 Yellow_L07 00:02:01
1850684 Yellow_L38 00:01:32
1850688 Yellow_L07 00:00:21
1850689 Yellow_L38 00:01:11
1850691 Yellow_L29a 00:00:22