\d ksql \l ksql \d .k \d kparse \l kparse \d .k KSQL:kparse.KSQL:ksql.KSQL \l show run:{[e]ksql.eval kparse.ksql e} aa:10;bb:20;run"cc:aa+bb;cc+1000" t:.+(`k`f;(1 1 1 4 4 3 3 3 3 3;!10)) u:ksql.xkey[`k]@.+(`k`g;(1 2 3;`A`B`C)) v:ksql.xkey[`g]@.+(`g`h;(`A`C;1000 2000)) show run"(t lj u)lj v" show run"t lj/(u;v)" show run"{select from t lj `k xkey u where {exec f from t lj `k xkey u}<4}" show run"{x+y}[2;3]" show run"{select from .+(`f`g;2 3#!6)}" show data.p:@[_n;`name`color`city`weight;{:[@z;x _draw z;z x _draw#z]}[30];(`screw`bolt`nut;`red`white`blue;`london`nyc`rome`paris;100 _draw 1000)] show run"{select from data.p where weight=(max;weight)fby city}" show run"{select from data.p where weight=(max;weight)fby city,color=`blue}" show run"{select from data.p where weight=(max;weight)fby{select name,city from data.p},color=`blue}" aaa:10;bbb:20 run"(max;min;aaa+bbb)" run"(+)" show data.p:@[_n;`name`color`city`weight;{:[@z;x _draw z;z x _draw#z]}[30];(`screw`bolt`nut;`red`white`blue;`london`nyc`rome`paris;100 _draw 1000)] show run"{select from .k.data.p where weight=(max;weight)fby city}" show t:.+(`k`f;(!5;!5)) show run"t insert 100 200" show run"t insert(100 200 300;400 500 600)" show run"{select q:+(k;f) from t}" show t:.+(`k`f;(1 1 1 4 4 3 3 3 3 3;!10)) show u:.+(`k`g;(1 2 3;`A`B`C)) show run"t lj xkey[`k;u]" show run"{select from t lj xkey[`k;u] where {exec f from t lj xkey[`k;u]}<4}" d.t:.+(`x`y;(`a`b`c`c`d`e`d`f`f`f`a`b;!12)) show run"{select sum y from d.t}" show data.p:@[_n;`name`color`city`weight;{:[@z;x _draw z;z x _draw#z]}[30];(`screw`bolt`nut;`red`white`blue;`london`nyc`rome`paris;100 _draw 1000)] show run"{select from data.p where weight=(max;weight)fby city}" show run"{select from data.p where weight=(max;weight)fby city,color=`blue}" show run"{select from data.p where weight=(max;weight)fby{select name,city from data.p},color=`blue}" show x.t:.+(`c1`c2`c3;(`a`b`c;10 20 30;1.1 2.2 3.3)) show run"`new1`new2 xcol x.t" show run"`c3 xcols x.t" show run"`c3`c2 xcols x.t" show run"{select from(.+(`f`g;(`a`b`c`c;!4)))where f _lin`c`g}" show run"{select from(.+(`f`g;(4#{exec x from d.t};!4)))}" data.t:@[_n;`f`g`h`i`j;{:[@z;x _draw z;z x _draw#z]}[100];(`a`b`c`d`e;7;0;0;0)] show c.t:.+(`f`g;(!10;10#`a`b`c`d)) show d.t:.+(`x`y;(`a`b`c`c`d`e`d`f`f`f`a`b;!12)) show e.t:.+(`x`y;(`a`b`c`d;4 9 3 0)) show run"`y xdesc{select from e.t}" show f.t:.+(`x`y;(1 2 2 3;`a`b`b`c)) show run"distinct f.t" show run"{select from(.+(`f`g;(4#{exec x from d.t};!4)))}" show run"{select from{select from data.t}where f _lin`c`g}" show run"{select from(.+(`f`g;(`a`b`c`c;!4)))where f _lin`c`g}" show run"{select from c.t where g _lin{exec x from d.t where y<8,y>2}}" show run"{select p:sum i,q:sum i+1,r:avg i,s:sum i+j by f,g from data.t where f=`c,g _lin 2 3 4,h>.5}" data.a:100 200 300 show run"+/data.a" x.t:.+(`c1`c2;(`a`b`c;10 20 30)) show run"{update c1:`x`y`z from x.t}" a.t:.+(`f`g;(1 2 2 4;5 6 7 8)) b.t:.+(`a`b;2 2#!4) show ksql.xkey[`f]@.+(`f`g;(1 2 3;3#.+(`x`y;(10 20 30;40 50 60)))) d.t:.+(`x`y;(`a`b`c`c`d`e`d`f`f`f`a`b;!12)) show run"{select y+1 from {select from d.t where y<5}}" \