Created
March 15, 2022 07:35
-
-
Save ereshzealous/a306cc5e3833f03464315953d76627d3 to your computer and use it in GitHub Desktop.
This file contains 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
from(bucket: "local") | |
|> range(start: -1y) | |
|> filter(fn: (r) => r["_measurement"] == "ticks") | |
|> filter(fn: (r) => r["_field"] == "price") | |
|> filter(fn: (r) => r["product"] == "AGUX/USD") | |
|> aggregateWindow(every: 1y, fn: max, createEmpty: false) | |
|> yield(name: "max") | |
from(bucket: "local") | |
|> range(start: -1y) | |
|> filter(fn: (r) => r["_measurement"] == "ticks") | |
|> filter(fn: (r) => r["_field"] == "price") | |
|> filter(fn: (r) => r["product"] == "AGUX/USD") | |
|> aggregateWindow(every: 1y, fn: min, createEmpty: false) | |
|> yield(name: "min") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment