# Tag Calculation query vs Tag History Query

**URL:** <https://forum.inductiveautomation.com/t/tag-calculation-query-vs-tag-history-query/27220>\
**Category:** Ignition\
**Created:** [August 7, 2019, 8:31am UTC](https://forum.inductiveautomation.com/t/tag-calculation-query-vs-tag-history-query/27220 "2019-08-07T08:31:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [August 7, 2019, 8:31am UTC](https://forum.inductiveautomation.com/t/tag-calculation-query-vs-tag-history-query/27220/1 "2019-08-07T08:31:28Z")

</div>

Hello

I set a Tag History Query to Range aggregation mode with sample size = 1, so I can get a single valve of my tag(Tmax-Tmin)  
I also set Tag Calculation Query to Range aggregation mode with the sample time range of ag History Query but I get another value.  
When I manually calculate the result I see only Tag Calculation Query return right value. and Tag History Query value is wrong.  
Can some one explain why Tag History Query is wrong?
