\d .util / import designated function or entire directory use:{system["d"] upsert $[99h=type v:get x;v;(-1#` vs x)!1#v]} / return weekdays from list of dates wday:{x where 1=ap from r; r:0!select date:dt,sum bv,sum av,tv:sum ts by id from r; r}