Examples of flux queries

In the following video, at minute 42:44, there are examples of flux queries. Do you know where and how I can see these query examples?

Hello @s118,
That video wasn’t created by anyone here I’d ask them for the query.

however I can walk you through the functions

// store your data in variables so you can join it 
data1 = from(bucket: "bucket1")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "measurement1")
  |> filter(fn: (r) => r["_field"] == "field1")
// use the aggregate window function to calculate the mean over time windows denoted by the every parameter. In this cases this query was executed in the UI so the window period/every parameter is defined there. You can replace with a duration literal like "1d" for one day. 
  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
// use yield statements like print statements to return intermediate steps and verify that your flux script is doing what you want. you can use cmd + / to comment/uncomment flux code. 
  |> yield(name: "data1")

data2 = from(bucket: "bucket2")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "measurement2")
  |> filter(fn: (r) => r["_field"] == "field2")
  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
// you can use multiple yield statemetns
  |> yield(name: "data2")

// join the tables together. Join as many same columns as you can to avoid having redundant columns. For example if you're querying data from the same measurement include measurement in the on parameter like ["_time", "_measurement"]
join(
    tables: {data1: data1, data2: data2},
    on: ["_time"],
    method: "inner",
)

//use the map function to create a new column called level and conditionally transform values. If you're performing math with the map function like in the example you shared, you need to make sure that your data types are the same. So for example if your field values are integers, then you need to multiply an int. I'd simplify the example you gave by making the 0's floats instead of making the values integers. 
  |> map(
        fn: (r) => ({r with
            level: if r._value >= 95.0000001 and r._value <= 100.0 then
                "critical"
            else if r._value >= 85.0000001 and r._value <= 95.0 then
                "warning"
            else if r._value >= 70.0000001 and r._value <= 85.0 then
                "high"
            else
                "normal",
        }),
    )

Here are the docs on the functions used:
yield
aggregateWindow
join
map
map with conditionally
int

hello. thanks for the reply. I understand the queries in the video, and have learned a lot from them. The doubt is created in case there are more queries to continue learning. If they don’t exist, it wouldn’t be a bad idea to create them.