Yes you can work with ranges if your query provides corresponding output, as you can see in the form you can optionally select a column for “timeEnd” and if you do so, and the time value differs from “time”, you will get a range annotation for each row/event.
To try it out, you could duplicate the _time column in your query and add a fixed duration to it.
In my scenario, I store two fields “begin” and “end” in the measurement that I use as my annotation source. So I write the timestamps explicitely and “begin” just happens to be the same as “_time” for convenience in querying. But, you could also use join() to get a single row out of two queries which provide the time for begin, and end, respectively.
I would like to add the next _time column if the value is different. I mean, the first row would have _time: 2022-02-15T17:25:38 and add a _time2 column for example with 2022-02-15T17:25:43.