KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Accumulators – Access additional list / column Re: Accumulators – Access additional list / column

  • RVR

    Member
    September 6, 2022 at 12:00 am

    I was trying something like below. I am not sure if it works in all scenarios.

    I will validate your solution as well and revert soon.

    Thanks much for your patience. KX community support and response is just excellent

    update c2: {?[((y>x)|(z<x));y;x]}[0;c1;0^prev c] from t 
    c c1 c2 
    ---------- 
    30 10 10 
    40 20 20 
    25 5  20 
    20 25 25 
    4  5  5 
    4  4  4 
    4.5 3 4 
    4.5 3.5 4