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

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
  • 1544 Views
  • 5 replies
  • 0 kudos

RE: [personal kdb+] peach type error

X-Originating-IP: 174.7.128.233User-Agent: 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
  • 468 Views
  • 1 replies
  • 0 kudos