Flux - Where clause to filter by field value

The query SELECT * FROM "example" WHERE "fieldName" = 'value' checks if the field fieldName is equal to value. How can I do the same in Flux?

Hello @blueoracle,
Welcome! Thanks for your question and for giving flux a try :slight_smile:

  |> range(start:-1h)
  |> filter(fn: (r) =>
    r._measurement == "cpu" and
    r._field == "usage_system" and
    r.cpu == "cpu-total"

Use the Filter function.