Variable timeshift based on uuid - InfluxDB


I’m currently working on a project to compare vibration measurements, the data is stored in Flux.
My goal would be to compare the x last vibration measurements between each other on one line graph.
The data structure is the following:
Where uuid is the unique identifier for each measurement (I have ~1000 measurements per uuid)
I saw the different possibilities with timeshift but it only allows fixed shifts (1 day, 1 hour etc). I’d like to be able to do the same and put all the measurements against each other to be able to compare them.

Thanks !