Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document multi-row SQL operations with OVER #5499

Open
2 tasks
sanderson opened this issue Jun 24, 2024 · 0 comments
Open
2 tasks

Document multi-row SQL operations with OVER #5499

sanderson opened this issue Jun 24, 2024 · 0 comments
Assignees
Labels
InfluxDB v3 InfluxDB v3.0 (platforms using IOx) Proposal Proposed changes and updates

Comments

@sanderson
Copy link
Collaborator

SQL supports the OVER clause that allows you to perform operations involving multiple rows. For example, you can do things like moving averages:

SELECT *,
  avg(temp) OVER(ORDER BY time
     ROWS BETWEEN 2 PRECEDING AND CURRENT ROW )
     as moving_average
FROM home
WHERE room = 'Kitchen'
Relevant URLs
@sanderson sanderson added the Proposal Proposed changes and updates label Jun 24, 2024
@sanderson sanderson self-assigned this Jun 24, 2024
@jstirnaman jstirnaman added the InfluxDB v3 InfluxDB v3.0 (platforms using IOx) label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
InfluxDB v3 InfluxDB v3.0 (platforms using IOx) Proposal Proposed changes and updates
Projects
None yet
Development

No branches or pull requests

2 participants