---
title: Query data in InfluxDB
description: Learn to query data stored in InfluxDB using Flux and tools such as the InfluxDB user interface and the ‘influx’ command line interface.
url: https://docs.influxdata.com/influxdb/v2/query-data/
estimated_tokens: 730
product: InfluxDB OSS v2
version: v2
---

# Query data in InfluxDB

This page documents an earlier version of InfluxDB OSS. [InfluxDB 3 Core](/influxdb3/core/) is the latest stable version.

#### API token hashing is enabled by default in InfluxDB OSS 2.9.0

Stronger token security: tokens are stored as hashes on disk, so a copy of the database file doesn’t expose usable tokens. Existing tokens are hashed on first startup and the original strings can’t be recovered afterward — **capture any plaintext tokens you still need before you upgrade**.

For more information, see [Token hashing](/influxdb/v2/admin/tokens/#token-hashing).

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 and InfluxDB](/influxdb/v2/query-data/get-started/)

Get started with Flux, the functional data scripting language, and learn the basics of writing a Flux query that queries InfluxDB.

### [Query data with Flux](/influxdb/v2/query-data/flux/)

Guides that walk through both common and complex queries and use cases for Flux.

### [Query data with InfluxQL](/influxdb/v2/query-data/influxql/)

Use the InfluxDB v1 `/query` compatibility endpoint to query data in InfluxDB v2 using InfluxQL.

### [Execute queries](/influxdb/v2/query-data/execute-queries/)

There are multiple ways to query data from InfluxDB including the InfluxDB UI, CLI, and API.

### [Common queries](/influxdb/v2/query-data/common-queries/)

This collection of articles walks through common use cases for Flux queries.

### [Optimize Flux queries](/influxdb/v2/query-data/optimize-queries/)

Optimize your Flux queries to reduce their memory and compute (CPU) requirements.

![InfluxDB University](/svgs/influxdbu-full-white.svg)

#### InfluxDB Essentials

Learn how to write, query, and visualize data in InfluxDB in this **free** InfluxDB University course.

[Take the course](https://university.influxdata.com/courses/influxdb-essentials-tutorial/)

[query](/influxdb/v2/tags/query/) [flux](/influxdb/v2/tags/flux/)
