# Duplicated data using system.tag.queryTagHistory

**URL:** <https://forum.inductiveautomation.com/t/duplicated-data-using-system-tag-querytaghistory/33823>\
**Category:** Ignition\
**Created:** [April 9, 2020, 3:17pm UTC](https://forum.inductiveautomation.com/t/duplicated-data-using-system-tag-querytaghistory/33823 "2020-04-09T15:17:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roberto.buompane](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@roberto.buompane](https://forum.inductiveautomation.com/u/roberto.buompane)\
**Post date:** [April 9, 2020, 3:17pm UTC](https://forum.inductiveautomation.com/t/duplicated-data-using-system-tag-querytaghistory/33823/1 "2020-04-09T15:17:07Z")

</div>

I have a boolean read every minute and DB “on Change”. The value anyway will be written every 5 minute if it wasn’t changed.  
Using the function system.tag.queryTagHistory I would like have a list of records only when the data had changed.  
Example :  
minute data  
1 0  
6 0  
11 0  
13 1  
18 1  
19 0  
24 0  
29 0  
31 1  
34 1  
36 0  
41 0

I would like to obtain a list as follow :  
1 0  
13 1  
19 0  
31 1  
36 0

Is it possible using parameters of that function or I have to implement a for loop to throw duplicated data?

Thanks
