window join on more than 2 columns ?

https://learninghub.kx.com/forums/topic/window-join-on-more-than-2-columns

i have a table that has multiple columns, and among them a datetime, sym, trader_type.
I would like to do a window join on datetime, sym and trader type
is it possible?

Yes it is possible to have more than 2 columns, I extended the example in the Advanced Joins example from the Academy to demonstrate if you want to try it out

https://learninghub.kx.com/courses/kdb-developer-level-3/lessons/joins-2/

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

Thank you to both of you for your answers! always so much appreciated!