Aggregation of data in microsecond bars in kdb+
The below should work:
d:([]t:asc .z.P+100*10?100;v:10?10)select avg v by (10*1000) xbar t from d
Note that the output time column is still a 'timestamp' ("p") type, however the values are barred in microseconds.
I wrote the first xbar argument as (10*1000) for clarity. To change to 5 microseconds you can do (5*1000) etc.