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

nulls from mdev

When using mdev, I was producing a number of unexpected nulls. It seemsthat the definition is based on sqrt(avg(x^2) - avg(x)) without checkingthat the difference is non-negative before taking the square root.Example:q)5 mdev 10#1e-30 0 0 0 0 0 0 0 0...

Resetting Sums

Hi All,I have a tableminute cnt 14:00 3 14:01 5 14:02 3 14:03 7 14:04 8 14:05 3 14:06 6 14:07 6 14:08 1 14:09 2 14:10 3 and I'd like to add a running count by certain intervals. ie.minute cnt 5min14:00 3 314:01 5 814:02 3 1114:03 7 1814:04 8 2614:05 ...

hoffmanroni by New Contributor III
  • 2465 Views
  • 10 replies
  • 0 kudos

fill up the null value using the previous value by grouping

so I have a table date, sym, val where unfortunately, the 3rd entry sometimes is null. In that case, I want the previous value filling it up. I understood I could use "fills". But I wonder why below doesn;t work? table: update val: prev val by sym fr...

KdbNoob by New Contributor
  • 993 Views
  • 2 replies
  • 0 kudos

Type error from .Q.chk

Hi allThere is a HDB folder that throw "type" error if I run .Q.chk, but that HDB folder look correct to me, I can start a HDB process there and run query without problem.Just wonder how can I check more about what going wrong?Regards,

carfield1 by New Contributor
  • 760 Views
  • 2 replies
  • 0 kudos

simulating class behavior

I need some way to simulate class behaviour in qSomething I can call like thisd: .dictBuilder.new[];d.put[`y;13];d.put[`h`j`k; ("a";"b";"c")];res: d.build[];show resx| 1y| 13h| "a"j| "b"k| "c"So I came up with this idea1. store class instance in a na...