# Collecting Data and Aggregation Tag Historian vs Transaction Group

**URL:** <https://forum.inductiveautomation.com/t/collecting-data-and-aggregation-tag-historian-vs-transaction-group/77580>\
**Category:** Ignition\
**Tags:** ignition81, database\
**Created:** [August 8, 2023, 4:42pm UTC](https://forum.inductiveautomation.com/t/collecting-data-and-aggregation-tag-historian-vs-transaction-group/77580 "2023-08-08T16:42:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajiv\_Thapa](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@Rajiv\_Thapa](https://forum.inductiveautomation.com/u/Rajiv_Thapa)\
**Post date:** [August 8, 2023, 4:42pm UTC](https://forum.inductiveautomation.com/t/collecting-data-and-aggregation-tag-historian-vs-transaction-group/77580/1 "2023-08-08T16:42:29Z")

</div>

Hi,

I am trying to track the temperature of carrier as long as the carrier stays on the particular station. I would like to get the Average, Maximum and Minimum temperature during that period and write those values into separate table.

I am exploring both Tag Historian and Transaction Group for this purpose.

What would be the best way to do this.

---

<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:** [August 8, 2023, 4:50pm UTC](https://forum.inductiveautomation.com/t/collecting-data-and-aggregation-tag-historian-vs-transaction-group/77580/2 "2023-08-08T16:50:34Z")

</div>

In my experience, when you need to collect values that will be correlated with each other, the tag historian is terrible. I would use a transaction group that records at a steady pace while a carrier is present in the station, capturing the carrier ID or product serial, and temperature, and any other process variable that might turn out to be useful for analytics.

Then your reporting can use standard SQL GROUP BY on the carrier ID or serial number to perform your analytics. Doing the same thing with the historian is a horrible mess of scripting.
