Flux: join + "WHERE"

I’m joining a SQL table with an InfluxDB time series. Apart from the join operation, I would like to do the merge based on the timestamp: the one in the timeseries (_time) should be included in the boundaries contained in the SQL table (let’s say the SQL columns start and end) .

In practice, I would like to obtain something like (in SQL)

FROM sql_table s, timeseries ts
WHERE s.id = ts.id AND ts._time >= s.start AND ts._time >= s.end  

Is it possible to do that? I’m able to do the join between the two tables using the join() operator in flux but I was wondering what is the equivalent of the WHERE condition in the example.
Any help? Thanks

Found it!
The filter() function was the right fit for the job! I just added the range condition in there. Flux is really powerful if you know how to use it :slight_smile: