kdb+ and q
Q+A on all things kdb+ database and the q language
cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

Resolved! Why Q SQL doesn't work with "in"?

I have codes as below. Why the last line would fail? How to make it work? Thanks! t:([] c1:`a`b`a`c`b`c; c2:1 1 1 2 2 2; c3:10 20 30 40 50 60);select from t where c1 in enlist `a; // worksselect from t where c1 in `a`b; // works?[t;enlist (in;`c1;enl...

vivo by New Contributor II
  • 355 Views
  • 1 replies
  • 0 kudos

Resolved! In funtional qSQL, what is the meaning when the operator is a list?

In the below code, I can understand the meaning of (<), but cannot understand the meaning of (';~:;<). Why line 3 keeps 4 rows, while line 4 keeps 6 rows? What is the meaning of "~:" here? t:([] c1:`a`b`c`d`e`f; c2:1 1 1 2 2 2; c3:10 20 30 40 50 60);...

vivo by New Contributor II
  • 462 Views
  • 1 replies
  • 0 kudos

composition confusion

Composition has many "weired" syntax . Are they overloads of adverbs ? Is '[f ff] overload of ' adverb Another example is '[;]/[(g;f;ff)]

Resolved! Accumulators - Access additional list / column

I have a table created like below. t:([]c: 30 40 25 20 4 4; c1: 10 20 5 25 5 4) c2 is calculated Column (value from c1 or prev c2 is used based on evaluation). prev value is taken as 0 for first row / if not available Below are the calculations. c c1...

RV by New Contributor III
  • 1739 Views
  • 9 replies
  • 0 kudos