Use this tag for questions related to InfluxQL, an SQL-like query language for interacting with data in InfluxDB.
Questions tagged [influxql]
219 questions
2
votes
2 answers
What is the correct line delimiter to post multiple measurements to influxDB via WinHttpRequest?
I want to post multiple lines (measurements) of a timeseries to InfluxDB with precision in seconds (precision=s) via VBA and the WinHttp library.
When one measurement is posted everything works fine and the measurement can be found in the db.
When…

LuTei
- 25
- 4
2
votes
0 answers
Convert a comma separated string into differents rows in a single query in InfluxDB
I have a table in InfluxDB which, for optimization, contains a field that can either come only as it would be for example "FR204" or it can come in a string concatenated by commas as would be the case with "FR204, FR301".
The fact is that I would…

Adrián Barceló
- 21
- 1
2
votes
0 answers
How can I calculate the area under a graph with InfluxDB?
Here is a sample of my data:
> SELECT time, value from task Limit 5;
name: task
time value
---- -----
1540149422155456967 0
1540149423155456967 1
1540151481498019507 1
1540151482498019507 0
1540151680870649288 0
I have…

Chris Stryczynski
- 30,145
- 48
- 175
- 286
2
votes
0 answers
Calculating difference between value and (moving) average in InfluxQL
I'm tracking the performance of a wireless network and need to protocol when it is better or worse than expected. To protocol this I want a Grafana dashboard where the measured values (every 2 hours) are compared to the average measured previously…

roger.siegenthaler
- 63
- 5
2
votes
1 answer
Bind parameter to time dimension argument InfluxDB
So from the docs and countless examples online, it's clear that you can bind parameters in the WHERE clause of a query submitted to an InfluxDB server via HTTP like so:
curl -G 'http://example.com/query?' \
--data-urlencode 'q=SELECT * FROM…

ocket8888
- 1,060
- 12
- 31
2
votes
0 answers
Query InfluxDB with CASE or IF statement?
I am gathering metrics from my philips hue bridge and putting them into an InfluxDB. I'd like to be able to display some of these metrics on a dashboard.
A basic query looks like this:
SELECT mean("state.bri") AS "mean_state.bri" FROM…

InfluxNoob
- 21
- 1
- 3
2
votes
1 answer
InfluxDB how to query every nth value
I am trying to query data every nth element in InfluxDB. I am executing the command below to do so, but I am getting no results. I am using sample data that I created for the sake of the example.
The command I am running in Influx's CLI:
SELECT…

Kyle DeGennaro
- 188
- 3
- 12
1
vote
0 answers
How to translate a simple query from influxQL to Flux
I need to convert this query written in InfluxQL
USE MyDB; DROP SERIES FROM MyDB.autogen.MyTable WHERE MyTakKey = 'MyTagValue'
I need to convert into flux.
String influxQuery = "from(bucket:"MyDB/autogen")" + " |> range(start: 1970-01-01T00:00:00Z,…

lorenzo mora
- 11
- 1
1
vote
2 answers
How to transform Numbers to strings in InfluxDB 1.x Dashboards?
The visualization templates I have for creating a dashboard in Chronograf always expect numbers (except table). How can I make it so that I get text instead of a number in certain cases?
For instance:
The logic I want implement is:
if result eq 0…

Gill-Bates
- 559
- 8
- 22
1
vote
1 answer
influxdb count() gives wrong value
I have Influx DB where I store information related jenkins.
when I execute when below query
SELECT
project_name,
build_number,
build_result
FROM (
SELECT
project_name,
build_number,
build_result
FROM
"jenkins_data"
WHERE…

Sugatur Deekshith S N
- 491
- 1
- 5
- 19
1
vote
0 answers
Query data based on condition in InfluxDB
I'm fresher level person in influxDB and I strongly believe that this query is little hard to me. So before starting my question, first I'm showing my snippets
Measurement: Power
time id level wp1 wp2 wp3
---- --…

Md Enayat
- 147
- 1
- 12
1
vote
2 answers
Flux Query : iterate filter from a list
I search a way to filter by a loop/iterate from a list
is it possible?
The table tophdd contains 2 entries, but i can't filter these two entries with a regex.
tophdd = from(bucket: v.bucket)
|>range(start: v.timeRangeStart, stop:…

greg
- 33
- 5
1
vote
1 answer
Aggregate functions in InfluxQL are not giving output when a "tag" value is passed instead of "field"
I am using influxQL to query data from influxdb in order to see visualisations on Grafana. There are columns in the table , those are basically fields and tags, I want to count the distinct values of a tag column by grouping it by hourly time…
1
vote
1 answer
Select Multiple Columns with Flux
My data looks something like this --
I want to create a FLUX query which results into --
SELECT UUID, CUST_ID, PO_NO, TIMESTAMP FROM CUST_PO_DTLS WHERE PO_NO = ?
In my Influx DB bucket, UUID, CUST_ID, PO_NO are all fields.
Here, I explicitly…

Rahul Bhardwaj
- 2,303
- 1
- 17
- 28
1
vote
1 answer
How can I use the Python client library for influxdb to for queries? (InfluxDB OSS v1.8.10)
I learned how to download the client library and write to influxdb databases in influxdb OSS v1.8 at this link:
https://docs.influxdata.com/influxdb/v1.8/tools/api_client_libraries/#install-and-use-the-python-client-library
but I can't find out how…

Luis Davila
- 31
- 4