mysql - Timediff of same field having same id -


supposed have fields below:

id   fromstatus    time                   tostatus 1    ready         2016-08-05 08:36:27    break 1    break         2016-08-05 08:36:37    ready 1    ready         2016-08-05 08:40:27    break 1    break         2016-08-05 08:40:37    ready 

how can total time difference between break status ready status output should be

id   totalbreaktime 1    00:00:20 


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -