# Adding tags to a new measuremnt

**URL:** <https://community.influxdata.com/t/adding-tags-to-a-new-measuremnt/16917>\
**Category:** Systems\
**Created:** [November 25, 2020, 1:38pm UTC](https://community.influxdata.com/t/adding-tags-to-a-new-measuremnt/16917 "2020-11-25T13:38:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomZastrow](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@TomZastrow](https://community.influxdata.com/u/TomZastrow)\
**Post date:** [November 25, 2020, 1:38pm UTC](https://community.influxdata.com/t/adding-tags-to-a-new-measuremnt/16917/1 "2020-11-25T13:38:05Z")

</div>

Hello,

I have an aggregate function with an “where” clause and I want to store the result in an extra measurement:

select mean(field1) into measurement2 from measurement1 where tag1=‘xxx’;

Is there a way to include the tag “tag1” (=xxx) into the new measurement, so that I can make differentiations between the mean values on the basis of the tag?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [December 2, 2020, 8:55pm UTC](https://community.influxdata.com/t/adding-tags-to-a-new-measuremnt/16917/2 "2020-12-02T20:55:33Z")

</div>

Hello @TomZastrow,  
Welcome!  
I don’t think you can add tags with the Into Clause. You can write it to a new measurement though. This blog might be useful to you.

> **[InfluxDB InfluxQL | INTO Queries, ELAPSED() and Its Function](https://www.influxdata.com/blog/tldr-influxdb-tech-tips-january-05-2016/)**
>
> Read about the behavior of InfluxDB InfluxQL. How it is moving data & getting un-queryable tags, querying data based on function results & more.

Otherwise you can use set() in Flux in 2.0 to achieve that type of schema mutation.

> **[set() function | Flux 0.x Documentation](https://docs.influxdata.com/flux/v0.x/stdlib/universe/set/)**
>
> set() assigns a static column value to each row in the input tables.
