Design an Alarm System using a database

Hello,

I'm currently trying to design a process with ignition and would like some feedback on it. I am using Ignition 8.1.30 and I am making this in perspective using only a database.

My goal is to use a table that has a named query attached to it and grab the last two time stamps or rows and compare them to see if there was gap in between the minutes.

Example

Temp TimeStamp
42 C 2:31 pm
55C 2:33 pm

2:32 pm is missing, so I would like to continuously check the last two rows every minute and create an alarm system that stores the time it happened.

I was thinking of using Gateway Events. Is it possible to access the table values from Gateway Events?

Is there a better solution for my needs?

Thank You

I can think of a few ways to accomplish this. There would be no GUI aspect to this, correct? Simply watching database records and logging a new record when that 'skipped minute' condition is true?

Yes there is a GUI in place, but I was hoping use the alarm component system , not sure if that is possible.

I also thought of another solution which was to dynamically take the last two values store them in 2 tags, then compare, if condition is true push this to the alarm system.