Hi there,

I would like a way to generate a linear sequence from an order operation.

Let me explain with an example where I select a certain range and I have to sort the kWh consumption in descending order.

```
from(bucket: "site_monitoring/autogen")
|> range(start: dashboardTime)
|> filter(fn: (r) => r._measurement == "gas" and (r._field == "kWh"))
|> sort(columns: ["kWh"], desc: true)
|> limit(n:10, offset: 0)
```

I now want to generate a column called order that contains the linear sequence from 1 to 10.

This is basically a duration curve that I then plot in Grafana via XY plot.

Any help would be appreciated as I can’t find a useful function for generating it.