There is a table in a Informix database that has stacked data that represents call center agents as they go about their day. LoggedIn or 1 is the first state they enter into on the phones. They can then move to other states such as ready (3) or not ready (2).
I would like to calculate the time in seconds between the logged in (1) and logout (7) states.
There is a example worksheet with the original data that I am working with as well as the desired results on another tab.
This is Informix SQL so my options are limited to functions within Informix and standard SQL.