# Not sure if I'm using an hour meter transaction group properly

**URL:** <https://forum.inductiveautomation.com/t/not-sure-if-im-using-an-hour-meter-transaction-group-properly/32578>\
**Category:** Ignition\
**Created:** [February 25, 2020, 1:49pm UTC](https://forum.inductiveautomation.com/t/not-sure-if-im-using-an-hour-meter-transaction-group-properly/32578 "2020-02-25T13:49:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 26, 2020, 1:09pm UTC](https://forum.inductiveautomation.com/t/not-sure-if-im-using-an-hour-meter-transaction-group-properly/32578/5 "2020-02-26T13:09:53Z")

</div>

If you want to be precise, record every transition of your “Running” status in a table with a timestamp. Perform delta calculations from event to event, summing the deltas that are “true” at the start. (The lead() and lag() window aggregate functions in SQL are the most efficient means to do this, imnsho.) Clip the deltas to specific time periods to summarize by hour/shift/day/week/whatever.

---

_[View the full topic](https://forum.inductiveautomation.com/t/not-sure-if-im-using-an-hour-meter-transaction-group-properly/32578)._
