KX Community

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

Home Forums kdb+ window join on more than 2 columns ? Reply To: window join on more than 2 columns ?

  • unterrainer_ale

    Member
    September 13, 2024 at 8:52 am

    Hi fav_pa,

    yes, a window join wj for several columns is possible. The syntax is

    wj[w;c;t;(q;(f0;c0);(f1;c1))]

    where w is your window, c are the columns you want to match on, in your case this would be sym, date time and trader type. As with the asof join, aj, the time column should be the last in your list, so I assume it’s sym,traderType,datetime (I am avoiding the symbol syntax because of the known UI issue).

    You can read more about wj here https://code.kx.com/q4m3/9_Queries_q-sql/#999-window-join