I want to calculate the average request duration in 1 hour windows. Using the InfluxDB internal metrics as an example, I think this query is close to what I want:
Give each stream defined in variables a unique yield name. The version of Flux packaged with InfluxDB 1.7.4 is a little older, but I don’t believe this is required any more in newer versions of Flux (which should roll out with the next InfluxDB release.
I also notice the mapping syntax in your join isn’t quite right. This query works, although the data needs to be transformed a bit more to get a useful visualization.