This is my table structure:
monResults:
id Int(10)
monDateTime Datetime()
typeId int(10)
I need a query to get all monResults that have consecutive monDateTimes that are less than 1 minute apart and have the same typeId. I want to be able to get X number of these events. Mostly I don’t know how to add the condition to make consecutive results be less than 1 minute apart.
There are some answers in this question which might lead you in the right direction:
Group events by temporal distance in SQL