Trouble moving from InfluxQL to Flux

Hi,
I’m storing my values in an influxdb:
measurement: sensors
Fields: sensorname and humidity (note: each sensor is logged with its humidity value at the same time)

With InfluxQL it was easy to gather the data of each sensor and display the values in grafana:
"SELECT mean("DeviceName") FROM "autogen"."humidty" WHERE ("DeviceName"::field = ‘Office’) AND $timeFilter GROUP BY time($__interval) fill(null)

While trying to achieve the same with Flux, I never succeed. I can either show the sensor names or the values, but never select all values which belong to a sensor.
Or should I end up using an individual measurement for each sensor? (There was never a need for that in MySQL or so, but maybe I’m misunderstanding the idea of NoSQL).

Any help here would appreciated!
Thanks
Jan

Hello @jaal,

Hmmm…Actually my first recommendation would be to stop learning Flux. I’d wait for the v3 OSS to land (later this year) and continue to use InfluxQL or SQL for your queries with v3 supports.
Is this an option for you?

This might be helpful though:

1 Like

Well stop learning Flux is an unexpected advice, but if InfluxQL is not deprecated (my expectation was, that InfluxQL was legacy and will replaced by Flux) and v3 even would support SQL/InfluxQL, I definitely will wait. So I can even still use InfluxQL in Grafana now and my work will not be useless.

Thanks for your help!
(Nevertheless: I will read your article and try to understand how I can probably transform my query to Flux. Just for my own curiosity.)