I have a historical logging server (Intellution iHistorian) that will allow me to retrieve my historical SCADA data and I am having trouble with an appropriate query (new to SQL).
I am logging the open and closing of automated valves, around 40 of them to be exact, and I need to extract when they opened and how long they were open. I assume I should be able to just get this from the open timestamp then do a calc with the close timestamp, just not sure of how to go about it. The valves would likely cycle a few times a day and I would need to report on each cycle, really not sure about that part.
Any help would be more than appreciated,