# \#query

**URL:** https://community.influxdata.com/tag/query/34.md

[Latest](https://community.influxdata.com/latest.md) · [Categories](https://community.influxdata.com/categories.md) · [Tags](https://community.influxdata.com/tags.md)

---

## [Aggregate/Group Data in Grafana with SQL](https://community.influxdata.com/t/aggregate-group-data-in-grafana-with-sql/58717)

<div class="topic-metadata">

**Author:** [@dominik.w](https://community.influxdata.com/u/dominik.w)\
**Replies:** 2\
**Last updated:** [September 2, 2026, 7:11am UTC](https://community.influxdata.com/t/aggregate-group-data-in-grafana-with-sql/58717 "2026-09-02T07:11:40Z")

</div>

Hi, I am using Influxdb3 to Store data from my Data logger. Writing to it with the following line Protocol spine,point=a\_voltage,unit=V value=230.5 171234567890123456 works fine. Currently I write multiple points ever…

---

## [How to parse multiple values from a single string field?](https://community.influxdata.com/t/how-to-parse-multiple-values-from-a-single-string-field/58383)

<div class="topic-metadata">

**Author:** [@dewi-ny-je](https://community.influxdata.com/u/dewi-ny-je)\
**Replies:** 3\
**Last updated:** [March 25, 2026, 8:35am UTC](https://community.influxdata.com/t/how-to-parse-multiple-values-from-a-single-string-field/58383 "2026-03-25T08:35:14Z")

</div>

Home Assistant provides day ahead electricity prices as attributes of the entity “current electricity price”, so in InfluxDB those values appear all together in the field “prices\_str” as string: (InfluxQL query for comp…

---

## [InfluxDB 1.8 – All data disappeared after changing retention policies](https://community.influxdata.com/t/influxdb-1-8-all-data-disappeared-after-changing-retention-policies/58366)

<div class="topic-metadata">

**Author:** [@mb19](https://community.influxdata.com/u/mb19)\
**Replies:** 4\
**Last updated:** [March 18, 2026, 12:54pm UTC](https://community.influxdata.com/t/influxdb-1-8-all-data-disappeared-after-changing-retention-policies/58366 "2026-03-18T12:54:41Z")

</div>

Hi there, I’m trying to understand what happened with my InfluxDB instance because all data prior to Feb 4 disappeared, and I suspect it may be related to changes I made to the retention policies. My version: InfluxDB…

---

## [Calculate Power Consumption on defined Periode with TAGS](https://community.influxdata.com/t/calculate-power-consumption-on-defined-periode-with-tags/57649)

<div class="topic-metadata">

**Author:** [@Franck\_Bellot](https://community.influxdata.com/u/Franck_Bellot)\
**Replies:** 4\
**Last updated:** [January 5, 2026, 7:20am UTC](https://community.influxdata.com/t/calculate-power-consumption-on-defined-periode-with-tags/57649 "2026-01-05T07:20:17Z")

</div>

Hello Team, I hope you’ll be able to help me, because I’m completely confused about getting the right calculation. I’d like to know the electricity power consumption of my equipment per day by mode. Okay, that sounds b…

---

## [Query Error with COUNT in InfluxDB 3: "Exceed file limit of 432 parquet files"](https://community.influxdata.com/t/query-error-with-count-in-influxdb-3-exceed-file-limit-of-432-parquet-files/58184)

<div class="topic-metadata">

**Author:** [@Yuchen](https://community.influxdata.com/u/Yuchen)\
**Replies:** 1\
**Last updated:** [December 17, 2025, 10:15am UTC](https://community.influxdata.com/t/query-error-with-count-in-influxdb-3-exceed-file-limit-of-432-parquet-files/58184 "2025-12-17T10:15:54Z")

</div>

Hello everyone, I’m currently working with InfluxDB 3 and encountering an issue when trying to count the total number of rows in a table. When I run a simple query like: SELECT count(filed) FROM my\_table; I get the f…

---

## [Design question! Bad performance with many signals and last()](https://community.influxdata.com/t/design-question-bad-performance-with-many-signals-and-last/58159)

<div class="topic-metadata">

**Author:** [@kaiserp](https://community.influxdata.com/u/kaiserp)\
**Replies:** 2\
**Last updated:** [December 16, 2025, 1:56pm UTC](https://community.influxdata.com/t/design-question-bad-performance-with-many-signals-and-last/58159 "2025-12-16T13:56:58Z")

</div>

I’m reaching out because we’re experiencing serious performance issues with our current setup. Most problems are within one tenant, containing ~8000 signals. New values every minute. Schema: org: environment bucket: t…

---

## [Difference() got a time shift and there are duplicate dates at the end](https://community.influxdata.com/t/difference-got-a-time-shift-and-there-are-duplicate-dates-at-the-end/30749)

<div class="topic-metadata">

**Author:** [@Ray\_Magini](https://community.influxdata.com/u/Ray_Magini)\
**Replies:** 5\
**Last updated:** [December 6, 2025, 2:34pm UTC](https://community.influxdata.com/t/difference-got-a-time-shift-and-there-are-duplicate-dates-at-the-end/30749 "2025-12-06T14:34:16Z")

</div>

I am on my first steps with flux right now and I cannot solve this issue, maybe someone could help me to understand it. I’ve got a shelly plug that reports a total energy value, it’s an increasing value. So I tried to f…

---

## [Fill data with last value before time range](https://community.influxdata.com/t/fill-data-with-last-value-before-time-range/58134)

<div class="topic-metadata">

**Author:** [@jhoos70](https://community.influxdata.com/u/jhoos70)\
**Replies:** 1\
**Last updated:** [December 1, 2025, 8:57pm UTC](https://community.influxdata.com/t/fill-data-with-last-value-before-time-range/58134 "2025-12-01T20:57:30Z")

</div>

I am coming from InfluxDB 2 with Flux and try to switch to InfluxDB 3 with SQL and struggle a little bit with the possibilities SQL offers or doesn´t offer. In a Grafana visualisation you often want to fill a gap at the …

---

## [Derivative() only showing some results](https://community.influxdata.com/t/derivative-only-showing-some-results/58078)

<div class="topic-metadata">

**Author:** [@HGeadas](https://community.influxdata.com/u/HGeadas)\
**Replies:** 0\
**Last updated:** [November 13, 2025, 10:34am UTC](https://community.influxdata.com/t/derivative-only-showing-some-results/58078 "2025-11-13T10:34:00Z")

</div>

Hi community, Basically I am trying to using InfluxDB Cloud & Telegraf to get the OID of network devices in order to display the Traffic IN / OUT. However, when I try to run the following query, I am not getting all th…

---

## [InfluxDB Cloud Error: “An internal error has occurred” (Region: eastus-1)](https://community.influxdata.com/t/influxdb-cloud-error-an-internal-error-has-occurred-region-eastus-1/58064)

<div class="topic-metadata">

**Author:** [@Bill\_Chung](https://community.influxdata.com/u/Bill_Chung)\
**Replies:** 1\
**Last updated:** [November 11, 2025, 8:57am UTC](https://community.influxdata.com/t/influxdb-cloud-error-an-internal-error-has-occurred-region-eastus-1/58064 "2025-11-11T08:57:12Z")

</div>

Hello InfluxData Support, Our InfluxDB Cloud instance in region eastus-1 is currently failing with the error message: “An internal error has occurred.” This happens consistently when accessing the Cloud UI and when ru…

---

## [Using opentelemetry histogram data written to influx](https://community.influxdata.com/t/using-opentelemetry-histogram-data-written-to-influx/58041)

<div class="topic-metadata">

**Author:** [@kevin0x90](https://community.influxdata.com/u/kevin0x90)\
**Replies:** 3\
**Last updated:** [October 30, 2025, 7:58pm UTC](https://community.influxdata.com/t/using-opentelemetry-histogram-data-written-to-influx/58041 "2025-10-30T19:58:14Z")

</div>

Hi, I have the following setup: an application using opentelemetry to record histogram values (request duration) this gets exported to a telegraf agent running the opentelemetry input service with prometheus\_v2 config…

---

## [Simple PHP Curl V1 API request to query the MEASUREMENTS](https://community.influxdata.com/t/simple-php-curl-v1-api-request-to-query-the-measurements/58026)

<div class="topic-metadata">

**Author:** [@gerald.hoch](https://community.influxdata.com/u/gerald.hoch)\
**Replies:** 2\
**Last updated:** [October 27, 2025, 1:37pm UTC](https://community.influxdata.com/t/simple-php-curl-v1-api-request-to-query-the-measurements/58026 "2025-10-27T13:37:01Z")

</div>

I’m trying to run a simple query to read the measurements (tables) using PHP code V1 API using curl, but I always get an error message , we have a “V3 Cloud Serverless Version” license. Is this possible, or do I need t…

---

## [Influxdb 2 stops when grafana query 500+ tag metrics simultaneously](https://community.influxdata.com/t/influxdb-2-stops-when-grafana-query-500-tag-metrics-simultaneously/58029)

<div class="topic-metadata">

**Author:** [@raja\_sekar](https://community.influxdata.com/u/raja_sekar)\
**Replies:** 1\
**Last updated:** [October 27, 2025, 1:36pm UTC](https://community.influxdata.com/t/influxdb-2-stops-when-grafana-query-500-tag-metrics-simultaneously/58029 "2025-10-27T13:36:01Z")

</div>

I have influxdb2-2.7.11-windows running with 3000+ tags loaded by telegraf which pulls data from opcua server. Grafana V12.0.0 running in ubuntu server has 500+ stat panels using fluxql for the influxdb datasource. The p…

---

## [InfluxDB v2 Deadlock or Disk Issues](https://community.influxdata.com/t/influxdb-v2-deadlock-or-disk-issues/57929)

<div class="topic-metadata">

**Author:** [@ticchioned](https://community.influxdata.com/u/ticchioned)\
**Replies:** 5\
**Last updated:** [October 9, 2025, 10:30am UTC](https://community.influxdata.com/t/influxdb-v2-deadlock-or-disk-issues/57929 "2025-10-09T10:30:29Z")

</div>

I am using a v2.7.12 InfluxDB server and experiencing a deadlock very similar to this bug, which was supposedly fixed in v2.7.12: Possible Deadlock in TagValueIterator() and AddSeriesList() · Issue #26164 · influxdata/in…

---

## [Change time format](https://community.influxdata.com/t/change-time-format/57978)

<div class="topic-metadata">

**Author:** [@DGR75](https://community.influxdata.com/u/DGR75)\
**Replies:** 2\
**Last updated:** [October 1, 2025, 5:27pm UTC](https://community.influxdata.com/t/change-time-format/57978 "2025-10-01T17:27:45Z")

</div>

where is the mistake here? InfluxDB v2.7.12 error @6:46-6:50: record is missing label formatTime import "date" from(bucket: "iobroker\_all") |\> range(start: v.timeRangeStart, stop: v.timeRangeStop) |\> filter(fn: …

---

## [Error while planning query: order\_union\_sorted\_inputs](https://community.influxdata.com/t/error-while-planning-query-order-union-sorted-inputs/57870)

<div class="topic-metadata">

**Author:** [@micatovin](https://community.influxdata.com/u/micatovin)\
**Replies:** 4\
**Last updated:** [September 10, 2025, 1:21pm UTC](https://community.influxdata.com/t/error-while-planning-query-order-union-sorted-inputs/57870 "2025-09-10T13:21:33Z")

</div>

Hi, I have this problem from time to time, and then it disappears for the same query. I can’t seem to find out why. I have tried so many ways to debug, but no luck. It is making my system unstable as it comes and goes fo…

---

## [Flux queries and Influxdb3](https://community.influxdata.com/t/flux-queries-and-influxdb3/57871)

<div class="topic-metadata">

**Author:** [@nygma2004](https://community.influxdata.com/u/nygma2004)\
**Replies:** 1\
**Last updated:** [September 1, 2025, 9:14am UTC](https://community.influxdata.com/t/flux-queries-and-influxdb3/57871 "2025-09-01T09:14:54Z")

</div>

I have been using influxdb 2.x.x (OSS) for a few year, gotten used to the flux query language and I like the flexibility and options it offers. I am setting up a new test server for myself, and checking the documentatio…

---

## [Querying Latest 50 Records When Recent Data Time is Unknown](https://community.influxdata.com/t/querying-latest-50-records-when-recent-data-time-is-unknown/57858)

<div class="topic-metadata">

**Author:** [@shijianoo](https://community.influxdata.com/u/shijianoo)\
**Replies:** 3\
**Last updated:** [August 28, 2025, 12:52pm UTC](https://community.influxdata.com/t/querying-latest-50-records-when-recent-data-time-is-unknown/57858 "2025-08-28T12:52:06Z")

</div>

How can I quickly query the latest 50 records from a bucket when I don’t know when the most recent data was inserted? The latest data could be from a day ago, a month ago, or even a year or two ago.

---

## [Garbage performance for getting n amount of last elements from fields](https://community.influxdata.com/t/garbage-performance-for-getting-n-amount-of-last-elements-from-fields/57611)

<div class="topic-metadata">

**Author:** [@Adam\_Labus](https://community.influxdata.com/u/Adam_Labus)\
**Replies:** 4\
**Last updated:** [August 22, 2025, 11:15pm UTC](https://community.influxdata.com/t/garbage-performance-for-getting-n-amount-of-last-elements-from-fields/57611 "2025-08-22T23:15:45Z")

</div>

I am running Influx Cloud 2.0. I have a measurement where each field is a sensor posting data at differing intervals. For each field I want to get n amount of latest records. For one record the flux query is: from(buc…

---

## [How to efficiently query the latest data timestamp for pagination without knowing the data time range?](https://community.influxdata.com/t/how-to-efficiently-query-the-latest-data-timestamp-for-pagination-without-knowing-the-data-time-range/57830)

<div class="topic-metadata">

**Author:** [@shijianoo](https://community.influxdata.com/u/shijianoo)\
**Replies:** 2\
**Last updated:** [August 22, 2025, 1:21am UTC](https://community.influxdata.com/t/how-to-efficiently-query-the-latest-data-timestamp-for-pagination-without-knowing-the-data-time-range/57830 "2025-08-22T01:21:34Z")

</div>

I’m implementing a web frontend with pagination for InfluxDB data, but I’m facing a performance challenge when dealing with buckets that have unknown data time ranges. I’m using anchor-based pagination with the followin…

---

## [InfluxDB v2.7.11 subquery](https://community.influxdata.com/t/influxdb-v2-7-11-subquery/57719)

<div class="topic-metadata">

**Author:** [@rossos](https://community.influxdata.com/u/rossos)\
**Replies:** 2\
**Last updated:** [July 29, 2025, 9:55pm UTC](https://community.influxdata.com/t/influxdb-v2-7-11-subquery/57719 "2025-07-29T21:55:11Z")

</div>

Hello, How can I make this work for me? I’m getting a mean values within 1min window with the first query in order to run a 2nd query on the result to sum up the values with a different time window. The idea is to ge…

---

## [\[solved\] Flux: Query for last value](https://community.influxdata.com/t/solved-flux-query-for-last-value/57616)

<div class="topic-metadata">

**Author:** [@DGR75](https://community.influxdata.com/u/DGR75)\
**Replies:** 1\
**Last updated:** [July 15, 2025, 5:14pm UTC](https://community.influxdata.com/t/solved-flux-query-for-last-value/57616 "2025-07-15T17:14:54Z")

</div>

Hello, I would like to display the current value for the current day in this chart in Grafana: The values for the current day are stored in a separate measurement, “Wind-currentDay.” However, I only need the last an…

---

## [Accruing values after change of state](https://community.influxdata.com/t/accruing-values-after-change-of-state/57545)

<div class="topic-metadata">

**Author:** [@Patrick808](https://community.influxdata.com/u/Patrick808)\
**Replies:** 0\
**Last updated:** [July 4, 2025, 4:09pm UTC](https://community.influxdata.com/t/accruing-values-after-change-of-state/57545 "2025-07-04T16:09:38Z")

</div>

I’m trying to estimate battery state of charge given a switch from charging to discharging and the accumulated energy from that point. The resource was helpful in getting some ideas and learning about the monitor functi…

---

## [Preferred query language moving forward](https://community.influxdata.com/t/preferred-query-language-moving-forward/57499)

<div class="topic-metadata">

**Author:** [@Adam\_Labus](https://community.influxdata.com/u/Adam_Labus)\
**Replies:** 1\
**Last updated:** [June 28, 2025, 1:08pm UTC](https://community.influxdata.com/t/preferred-query-language-moving-forward/57499 "2025-06-28T13:08:06Z")

</div>

I built my whole frontend app around Flux, thinking it to be the most future safe query language. Now with the version 3 rewrite, it’s support is dropped. Are queries better expressed in InfluxQL or in Flux? Which lang…

---

## [INFLUX Multiple Queries](https://community.influxdata.com/t/influx-multiple-queries/57427)

<div class="topic-metadata">

**Author:** [@uniquewaheed](https://community.influxdata.com/u/uniquewaheed)\
**Replies:** 1\
**Last updated:** [June 26, 2025, 9:36pm UTC](https://community.influxdata.com/t/influx-multiple-queries/57427 "2025-06-26T21:36:22Z")

</div>

Hello All, am using 4 different queries to display in table and I need to filter these queries according to my requirements to display Cisco BGP/CDP required value/fields in table. The required queries are mentioned bel…

---

## [SQL to get change rate](https://community.influxdata.com/t/sql-to-get-change-rate/56787)

<div class="topic-metadata">

**Author:** [@vvilaplana](https://community.influxdata.com/u/vvilaplana)\
**Replies:** 2\
**Last updated:** [June 13, 2025, 4:05pm UTC](https://community.influxdata.com/t/sql-to-get-change-rate/56787 "2025-06-13T16:05:27Z")

</div>

i have a measurement that it’s a counter (always increasing) and instead of returning the actual value of the counter i want to get the change rate. i can’t do this at graph level, i need to do this at backend SQL-query …

---

## [Strange Ghost topics in InfluxDB?](https://community.influxdata.com/t/strange-ghost-topics-in-influxdb/57301)

<div class="topic-metadata">

**Author:** [@redian](https://community.influxdata.com/u/redian)\
**Replies:** 2\
**Last updated:** [May 26, 2025, 5:38am UTC](https://community.influxdata.com/t/strange-ghost-topics-in-influxdb/57301 "2025-05-26T05:38:35Z")

</div>

Hi everyone, I’ve done a lot of testing with this one Bucket when i noticed there were a lot of strange suggested filter options, strange becouse they did not fit any of the data currently displayed in that bucket. The…

---

## [Grafana Flux Query](https://community.influxdata.com/t/grafana-flux-query/57254)

<div class="topic-metadata">

**Author:** [@uniquewaheed](https://community.influxdata.com/u/uniquewaheed)\
**Replies:** 1\
**Last updated:** [May 15, 2025, 11:15pm UTC](https://community.influxdata.com/t/grafana-flux-query/57254 "2025-05-15T23:15:26Z")

</div>

Hello All, am using Grafana 11.4.0 and InfluxDB v2.7 with Telegraf. am trying to get interface information from Cisco IOS XR devices by using variables queries. I can get the source devices by using device variable but …

---

## [\[\[inputs.icinga2\]\] - Services object query - specify specfic host and service](https://community.influxdata.com/t/inputs-icinga2-services-object-query-specify-specfic-host-and-service/56793)

<div class="topic-metadata">

**Author:** [@samtommy](https://community.influxdata.com/u/samtommy)\
**Replies:** 6\
**Last updated:** [May 14, 2025, 2:10am UTC](https://community.influxdata.com/t/inputs-icinga2-services-object-query-specify-specfic-host-and-service/56793 "2025-05-14T02:10:51Z")

</div>

Hello, It looks like this plugin doesn’t query all services objects including hosts and their services. Is there a way to make it happen? e.g. https://testicinga.com:5665/v1/objects/services/host-name!icinga \[\[inputs…

---

## [InfluxDB and Unity. Able to write, unable to query](https://community.influxdata.com/t/influxdb-and-unity-able-to-write-unable-to-query/56093)

<div class="topic-metadata">

**Author:** [@Topias\_Nykanen](https://community.influxdata.com/u/Topias_Nykanen)\
**Replies:** 4\
**Last updated:** [May 5, 2025, 2:53pm UTC](https://community.influxdata.com/t/influxdb-and-unity-able-to-write-unable-to-query/56093 "2025-05-05T14:53:30Z")

</div>

I’ve been testing out various database solutions to possibly integrate into my Unity project as means of storing coordinate data (in longitude-latitude pairs). Due to a recommendation from a co-worker I’ve also tried usi…

[Next page](https://community.influxdata.com/tag/query/34.md?match_all_tags=true&page=1&tags%5B%5D=query)
