Translate from influxql to flux


Im trying to change this query to flux but its imposible, ca anyone help me? Please.

SELECT integral(“value”, 1h) FROM “general_potencia” WHERE $timeFilter GROUP BY time(1h) fill(null)

@Juan_Souto Sorry, I know this is a little late, but here’s the Flux equivalent to your query:

from(bucket: "example-bucket")
    |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
    |> filter(fn: (r) => r._measurement == "general_potencia")
    |> aggregateWindow(every: 1h, fn: (tables=<-, column) => tables |> integral(unit: 1h))