How to query database with strict order?
I have raw data on a database with measurements on sensors a, b, c like this for example: unique_id;sensor;timestamp 111;A;2024-10-10 08:00:00.000000 222;C;2024-10-10 08:00:00.000000 333;A;2024-10-10 08:00:00.000000 444;A;2024-10-10 08:00:00.000000 555;A;2024-10-10 08:00:00.000000 666;C;2024-10-10 08:00:01.000000 777;C;2024-10-10 08:00:01.000000 888;C;2024-10-10 08:00:01.000000 555;B;2024-10-10 08:00:09.000000 111;A;2024-10-10 08:00:21.000000 444;A;2024-10-10 08:00:24.000000 444;A;2024-10-10 08:00:38.000000 444;B;2024-10-10 08:00:40.000000 666;C;2024-10-10 08:00:42.000000 111;C;2024-10-10 08:00:42.000000 444;B;2024-10-10 08:00:48.000000 111;C;2024-10-10 08:01:02.000000 666;C;2024-10-10 08:01:02.000000