Fix prev/next expression examples#3637
Open
intermittentnrg wants to merge 6 commits intotimescale:latestfrom
Open
Fix prev/next expression examples#3637intermittentnrg wants to merge 6 commits intotimescale:latestfrom
intermittentnrg wants to merge 6 commits intotimescale:latestfrom
Conversation
Contributor
|
Hi @intermittentnrg, thanks for this work. Is this PR still a draft or are you ready for review? Iain |
Contributor
Author
|
Ready for review. I tested & used the updated queries. But in the end couldn't use prev expression because there were no datapoints in queried range and prev expression is only used for datapoints within range. |
Contributor
|
Thanks @intermittentnrg , much appreciated. |
jonatas
reviewed
Feb 19, 2025
|
|
||
| ```sql | ||
| SELECT time_bucket_gapfill('1 day', time) AS day, | ||
| device_id, |
Contributor
There was a problem hiding this comment.
Should we add this to the group by clause too?
Contributor
Author
There was a problem hiding this comment.
Yes good point. GROUP BY device_id, day.
device_id should be either in GROUP BY or WHERE to make query realistic.
jonatas
reviewed
Feb 21, 2025
| FROM metrics m | ||
| WHERE time > '2021-12-31 00:00:00+00'::timestamptz | ||
| AND time < '2022-01-10 00:00:00-00'::timestamptz | ||
| GROUP BY day |
Contributor
There was a problem hiding this comment.
Suggested change
| GROUP BY day | |
| GROUP BY day, device_id |
jonatas
reviewed
Feb 21, 2025
| FROM metrics m | ||
| WHERE time > '2021-12-31 00:00:00+00'::timestamptz | ||
| AND time < '2022-01-10 00:00:00-00'::timestamptz | ||
| GROUP BY day |
Contributor
There was a problem hiding this comment.
Suggested change
| GROUP BY day | |
| GROUP BY day, device_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
[Short summary of why you created this PR]
Links
Fixes #[insert issue link, if any]
Writing help
For information about style and word usage, see the style guide
Review checklists
Reviewers: use this section to ensure you have checked everything before approving this PR:
Subject matter expert (SME) review checklist
Documentation team review checklist
and have they been implemented?