Learn to query data stored in InfluxDB using Flux and tools such as the InfluxDB user interface and the ‘influx’ command line interface.
Get started with Flux, InfluxData’s functional data scripting language. This step-by-step guide through the basics of writing a Flux query.
influx query command executes a literal Flux query provided as a string or a literal Flux query contained in a file by specifying the file prefixed with an ‘@’ sign.
Guides that walk through both common and complex queries and use cases for Flux.
Use the InfluxDB 1.x
/query compatibility endpoint to query data in InfluxDB Cloud with InfluxQL.
There are multiple ways to query data from InfluxDB including the InfluxDB UI, CLI, and API.
The InfluxDB v2 API includes InfluxDB 1.x compatibility endpoints that work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
Optimize your Flux queries to reduce their memory and compute (CPU) requirements.
filter() function to query data based on fields, tags, or any other column value.
filter() performs operations similar to the
SELECT statement and the
WHERE clause in InfluxQL and other SQL-like query languages.
Query your data in the InfluxDB user interface (UI) Data Explorer.
Learn the basics of using Flux to query data from InfluxDB.
Use the InfluxDB API to query InfluxDB data.
Learn the basics of using Flux to transform data queried from InfluxDB.
Use the Flux REPL to query InfluxDB data.
Use the influx CLI to query InfluxDB data.
increase() function to track increases across multiple columns in a table. This function is especially useful when tracking changes in counter values that wrap over time or periodically reset.
timedMovingAverage() functions to return the moving average of data.
derivative() function to calculate the rate of change between subsequent values or the
aggregate.rate() function to calculate the average rate of change per window of time. If time between points varies, these functions normalize points to a common time interval making values easily comparable.
fill() function to replace null values.
median() function to return a value representing the
0.5 quantile (50th percentile) or median of input data.
quantile() function to return all values within the
q quantile or percentile of input data.
cumulativeSum() function to calculate a running total of values.
last() functions to return the first or last point in an input table.
sql package provides functions for working with SQL data sources. Use
sql.from() to query SQL databases like PostgreSQL, MySQL, Snowflake, SQLite, Microsoft SQL Server, Amazon Athena, and Google BigQuery.
/query 1.x compatibility endpoint queries InfluxDB Cloud using InfluxQL.