Looks like a good scenario for ClickHouse.
One option is to just record all the measurements with the corresponding time.
Something like a table with:
sensor_id, time, value
To align and correlate the measurements, simply round down the time to some bucket. Do something like
SELECT toStartOfMinute(time) AS t, anyIf(value, sensor_id = 'X'), anyIf(value, sensor_id = 'Y')
FROM measurements
WHERE sensor_id IN ('X', 'Y')
GROUP BY t
ORDER BY t
Yes, I'm interested in, how it will go! milovidov@clickhouse.com