Use this tag for questions related to InfluxQL, an SQL-like query language for interacting with data in InfluxDB.
Questions tagged [influxql]
219 questions
1
vote
2 answers
How do I edit a measurement (= set of values with timestamp) in InfluxDB?
I am running an Influx database instance which collects data from various sources. Sometimes, this data is simply incorrect and needs to be corrected, otherwise later analyses will fail and/or produce incorrect results. However, InfluxDB's SQL-like…

Jens
- 1,386
- 14
- 31
1
vote
1 answer
Is it possible to retrieve only the timestamp from a influxDb query
Is it possible to pass the timestamp retuned in influxDb query to another query.
Select max("value")
from "temp" where ("floor" = "1);
Output
time max
---- ---
2020-01-17T00:00:00Z 573.44
Is it possible…

Sisir Ashik
- 49
- 2
- 10
1
vote
2 answers
How to escape single quotes in influxDB query
I'm trying to run a command on influxDB using -execute from the cli
influx -execute 'select * from test_measurement where time > \‘2020-01-13T16:22:00Z\’ and time < \‘2020-01-13T16:22:30Z\’ -username uname -password pwd
The query doesn't run as…

Anil
- 420
- 2
- 16
1
vote
1 answer
TIme bind parameter command error *influxql.StringLiteral are not compatible
Can someone please point out what I am doing wrong in my command below which gives the error shown below?
Command:
eCollection=( $(cut -d ',' -f2 new.txt ) )
start= date --utc +%FT%T.%2NZ
sleep 10
end= date --utc +%FT%T.%2NZ
for i in…

Mover
- 169
- 12
1
vote
0 answers
different data types for same field in influxDB
i am collecting data from telegraf plugins into influxDB. the data was reporting as integer since the begining, but one day it started reporting as float and now i see the below error in the logs:
field type conflict: input field “pid_count” on…

Tushar Mazumdar
- 33
- 5
1
vote
0 answers
Single line query for percentage from two different queries in influxdb for grafana
unable to get a query in grafana singlestat panel for influxdb -
my queries are from the same field not different field.
Example -
field name = fieldA
query1 = SELECT "fieldA" FROM seriesA WHERE $timeFilter AND ("tag1"='yes')
query2 = SELECT…
1
vote
0 answers
InfluxQL: How to Return Boolean if value(x) above or below (y) value?
I have a measurement value(x) that varies between 0 and 500. I would like to use a query to return 1 (Boolean) if this value(x) is below a set value(y) for example 200 and 0 if it is above. I need to do this for a discrete visualization I want to…

GlobalA
- 13
- 3
1
vote
0 answers
Insert from Influxdb subquery, rows missing and time set to 0
I am inserting rows to a new measurement from a subquery. The subquery returns 2 rows, but only one is actually inserted to the new measurement. In addition the time is set to 0, which means I had to set the duration in
RETENTION POLICY "autogen"…

Tech develop
- 45
- 7
1
vote
1 answer
Display binary events form InfluxDB datasource in Grafana as (on/off) unit jump
In my InfluxDB have a binary event stream that indicates whether an cleaning is ongoing (1) or not (0).
> SELECT * FROM cleaning LIMIT 10;
name: cleaning
time value
---- -----
1561622810000000000 1
1561623025000000000…

fischor
- 91
- 2
- 7
1
vote
1 answer
Translating InfluxDB query to PromQL
I am trying to rewrite a query from InfluxDB Query to PromQL:
SELECT non_negative_derivative("wait_time_ms", 1s) FROM "sqlserver_waitstats" WHERE ("sql_instance" =~ /^$InstanceName$/) AND ("wait_type" =~ /HADR/) AND $timeFilter GROUP BY…

Akash Masand
- 1,441
- 14
- 30
1
vote
1 answer
How to achieve the following sql query in influx?
Given a SQL query below with an IN clause, is there a way in influx to achieve the same output produced by this?
SELECT * FROM Suppliers
WHERE Country IN (SELECT Country FROM Customers)

Sai Sushanth
- 69
- 1
- 6
1
vote
1 answer
How can I query all InfluxDB _internal database measurements?
I cannot query following measurements from _internal database of InfluxDB using Influxql:
database
write
shard
See results for following commands:
> show databases
name: databases
name
----
_internal
>use _internal
> show measurements
name:…

darkDragon
- 455
- 3
- 12
1
vote
0 answers
Custom string as query output
Is it possible to get a custom string as a query output of SELECT query in influxQL?
> select time, uuid1, uuid2, id from mydb."autogen".data limit 1;
name: measurement1
time uuid1 uuid2 id
---- …

darkDragon
- 455
- 3
- 12
1
vote
0 answers
Can not compute reject rate in InfluxDB
I have 2 measurements OK and ERROR. I would like to compute an reject/error rate using this formula:
count(OK)
error rate = ------------------------
count(OK) + count(ERROR)
It would be nice to have a continuous…

Michal Špondr
- 1,337
- 2
- 21
- 44
1
vote
1 answer
Removing measurement name from infosql output
I am running a query in a batch process to extract data from InfluxDB. Query output always contains the measurement name as part of each line of output. Is there a way to remove the measurement name from the query result?
This is the command I am…

darkDragon
- 455
- 3
- 12