Query about time range in SQL Server? [closed]

1

Good day, I have to make a query about the generation of alarms, I want to know how many seconds it remains active (Column: EventTime) every period of power on and off (Column: Message), of the time that passes in that time I want to generate a total to show the type of active alarms and how much was its duration, but I can not find the way to do it since they do not have an ID or something that can help me to link the data, I would appreciate your help!

    
asked by Xavier 10.10.2017 в 22:37
source

1 answer

0

You can try to use the date in the EventTime column as an identifier, since the date of each record would be a unique value, so you would create the query that gets the defined data, but you should always have this data at your disposal, but in Theory would function correctly as an "identifying" column in your project.

Do not hesitate to ask and Greetings

    
answered by 11.10.2017 в 18:27