Home › Forums › kdb+ › xbar millisecond › Re: xbar millisecond
-
If you don’t cast to minutes first, you can explicitly group by millisecond (assuming your time column is a timestamp):
q)t:([]time:.z.p+500000*til 20;col:til 20) q)select avg col by 5000000 xbar time from t // millisecond = 1000000 nanoseconds time | col -----------------------------| ---- 2022.09.09D03:50:38.425000000| 2.5 2022.09.09D03:50:38.430000000| 10.5 2022.09.09D03:50:38.435000000| 17.5