Calculate time difference between records where the value changes KDB+/q
Advertisements I have a table like the below, with timestamps and values. show t:([]time:2022.10.10D12:30:00.100000000 2022.10.10D12:30:00.200000000 2022.10.10D12:30:00.300000000 2022.10.10D12:30:00.400000000 2022.10.10D12:30:00.500000000 2022.10.10D12:30:00.600000000;values: 1 1 1 2 2 3;duration: 300 200 100 200 100 0N) time values duration ——————————————— 2022.10.10D12:30:00.100000000 1 300 2022.10.10D12:30:00.200000000 1 200 2022.10.10D12:30:00.300000000 1 100 2022.10.10D12:30:00.400000000 2 200 2022.10.10D12:30:00.500000000 2 100 2022.10.10D12:30:00.600000000 3 The third column,… Read More Calculate time difference between records where the value changes KDB+/q