---
title: Common queries
description: This collection of articles walks through common use cases for Flux queries.
url: https://docs.influxdata.com/influxdb/v2/query-data/common-queries/
estimated_tokens: 608
product: InfluxDB OSS v2
version: v2
---

# Common queries

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).

The following articles walk through common queries using the [NOAA water database data](/influxdb/v2/reference/sample-data/#noaa-water-sample-data).

### [Operate on columns](/influxdb/v2/query-data/common-queries/operate-on-columns/)

Find and count unique values, recalculate the `_value` column, and use values to calculate a new column.

### [Use multiple fields in a calculation](/influxdb/v2/query-data/common-queries/multiple-fields-in-calculations/)

Query multiple fields, pivot results, and use multiple field values to calculate new values in query results.

### [Comparing values from different buckets](/influxdb/v2/query-data/common-queries/compare-values/)

Compare the value from the latest point to an average value stored in another bucket. This is useful when using the average value to calculate a threshold check.

### [IoT sensor common queries](/influxdb/v2/query-data/common-queries/iot-common-queries/)

Use Flux to address common IoT use cases that query data collected from sensors.

This list will continue to grow. If you have suggestions, please [submit them to the InfluxData Community](https://community.influxdata.com/c/influxdb2).

[queries](/influxdb/v2/tags/queries/)
