Convert tag value into integer

Hi,

I’m trying to select a subset of data as shown below into a new measurement, and then calculate the mean value. The value is treated as a string instead of an integer, eventhough it is inserted as an integer in the original measurement, but I think tags are probably treated as a type of string.
Is it possible to somehow convert (cast) the tag value into an integer?

> select ttr as value, value as ticket into test from ticketdesk
name: result
time written
---- --------
0       10

select * from test limit 3
name: test
time                       ticket       value
----                         -------       -------
1550902340000   PE-1234  13132
1550903500000   PE-1238  1022
1550909770000   PE-1245  20433

> select mean(value) from test
ERR: unsupported mean iterator type: *query.stringInterruptIterator

Hi , unfortunately that is not supported :

tag values are always of datatype string ,
you can cast fields from float to integer and integer to float ,

( in kapacitor you have the possibility to convert a string to an integer )

The :: syntax allows users to perform basic cast operations in queries. Currently, InfluxDB supports casting [field values] (https://docs.influxdata.com/influxdb/v1.7/concepts/glossary/#field-value) from integers to floats or from floats to integers.

see also here …