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

Forum Posts

When is dropping down to K necessary?

As I understand it, q is to some extent a subset of K4. Since resources for q are rather meager, I'm also drawing on stuff I can find related to K3 and J. When translating code from these languages to q, I'd like to know for what kinds of tasks I wou...

i3text by New Contributor
  • 5 replies
  • 0 kudos

weird / converge works in session but not inside function

depp:{[i] {[x]i+:1}/[{i~0};0]; :i} depp[0] / results in error 'ialthough I is defined.Please exuse but the function is useless but I am using it to illustrate I cant put converge inside the function. If you pull the stmts outside, then it works.

User by Not applicable
  • 1 replies
  • 0 kudos

RE: [personal kdb+] peach type error

X-Originating-IP: Workspace Webmail 5.15.9Message-Id: <20150831110650.85f80dae80d1d2f2e266ec6278e6cbe8.3dd5974ce5.wbe@email07.europe.secureserver.net>From: "David Demner \(AquaQ\)" To: personal-kdbplus@googlegroups.comSubject...

peach type error

Hello,Wondering if someone can tell me whats wrong with this. I have 2 slavesthis works{ (neg .z.w) [((count x) ; x)] } each (100000 cut (select from trade where date=2015.07.23, sym in `AAPL`GOOG))but this gives a type error{ (neg .z.w) [((count x) ...

getting the last 2 rows of each group

how do i go about getting the last two rows in a group?q)show t:flip `a`b!(1 1 2 3 3 3;til 6);a b---1 01 12 23 33 43 5q)select[-2] by a from ta| b-| -2| 23| 5q)select b by a from ta| b -| -----1| 0 1 2| ,2 3| 3 4 5the result i'd like is:a b---1 01 12...

effbiae by New Contributor
  • 1 replies
  • 0 kudos