docs-v2/content/influxdb3/cloud-dedicated
Jason Stirnaman ec70614a4e
docs(sql): add LAG examples for time-based value comparisons (#6577)
* chore(sql): add LAG examples for time-based value comparisons

Enhance window function documentation with practical examples for
calculating differences between current and previous values (e.g., 1h ago).

- Add 3 LAG examples to window functions reference with tested queries
- Create new 'Compare values' query guide covering common time-based
  comparison patterns (differences, percentage changes, exact intervals)
- Add guide frontmatter for all InfluxDB 3 products

All queries validated against InfluxDB 3 Core.

Refs: Kapa.ai conversation https://app.kapa.ai/720100f9-ce93-4305-88fd-5fcf71effad7/conversations/4536b79e-3930-4359-87f5-2ad9ccc1917d
Starting from: https://docs.influxdata.com/influxdb3/cloud-serverless/reference/sql/functions/window/

* chore(sql): add counter metrics examples to compare-values guide

Enhance time-based value comparisons with counter metrics patterns
using LAG and GREATEST to handle counter resets.

- Add counter metrics section with 3 examples (rate, cumulative, intervals)
- Include tested queries for non-negative differences and aggregation
- Document workarounds for Flux increase() and InfluxQL NON_NEGATIVE_DIFFERENCE()

All queries validated against InfluxDB 3 Core.

Refs: Kapa.ai conversation https://app.kapa.ai/720100f9-ce93-4305-88fd-5fcf71effad7/conversations/16b13679-0ced-4780-ab58-3d9cacb2d899
Starting from: https://docs.influxdata.com/influxdb3/enterprise/

* Update content/shared/influxdb3-query-guides/sql/compare-values.md

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

---------

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
2025-12-01 15:14:44 -06:00
..
.vscode InfluxDB 3 Core & InfluxDB 3 Enterprise alpha release (#5760) 2025-01-13 07:21:11 -07:00
admin fix: dedicated docs adjustments (#6562) 2025-11-21 12:47:58 -06:00
get-started fix: update calls to action in dedicated and clustered (#6049) 2025-05-09 16:01:15 -05:00
guides fix(influxdb3): (#6479) 2025-10-22 00:50:02 -05:00
process-data [WIP] Fix path issue with edit this page functionality (#6567) 2025-11-25 15:12:17 -06:00
query-data docs(sql): add LAG examples for time-based value comparisons (#6577) 2025-12-01 15:14:44 -06:00
reference docs: replace admin ui reference docs with inline docs 2025-11-19 16:13:36 -05:00
visualize-data refactor(influxdb3): consolidate ODBC content into Power BI documentation (#6546) 2025-11-17 22:28:46 -05:00
write-data fix(influxdb3): (#6479) 2025-10-22 00:50:02 -05:00
.vale.ini InfluxDB 3 Core & InfluxDB 3 Enterprise alpha release (#5760) 2025-01-13 07:21:11 -07:00
_index.md hotfix: fix influxdb3 cta links 2025-05-12 14:08:29 -06:00
pages.md InfluxDB 3 Core & InfluxDB 3 Enterprise alpha release (#5760) 2025-01-13 07:21:11 -07:00