Questions tagged [q-query]
6 questions
2
votes
4 answers
How to deal with symbol containing minus sign in KDB?
I got an annoying problem. We got stock symbol AGN-A in kdb+ database, but it seems almost impossible to query if this symbol is in a symbol list. The following query does not work at all:
`$"A-o" in (`$"A-o";`R)
Any idea how to solve this…

sciencemonk
- 69
- 5
1
vote
0 answers
Opencart 2.0 Product Quantity add/minus not working
I have a website, however the +/- buttons don't seem to work. I've not changed any of the code from the theme (Zorka), but I can't figure out how to fix the issue. Can someone please help?
Here's the website page: Webiste
The product.tpi looks like…

Stuart Cunningham
- 13
- 4
1
vote
1 answer
How to sample from KDB table to reduce data before querying?
I have a table of tick data representing prices of various financial instruments up to millisecond precision. Problem is, there are over 5 billion entries, and even the most basic queries takes several minutes.
I only need data with a precision of…

mchen
- 9,808
- 17
- 72
- 125
1
vote
1 answer
q Query: creating grid from a table
I have written a function that wraps a q query that returns me a table with three columns - c1,c2 and vals. How do I create a grid (2D array) such that I have c1 as x axis, c2 as y axis and values in the corresponding cells. For example, if one of…

user2696565
- 587
- 1
- 8
- 17
0
votes
1 answer
elasticsearch dsl python unpack q queries
How can I dynamically create a combined Q query in elasticsearch dsl python?
I have gone through docs and this SO post. I constructed a q_query dictionary with all required info.
ipdb> q_queries
{'queries': [{'status': 'PASS'}, {'status': 'FAIL'},…

cutteeth
- 2,148
- 3
- 25
- 45
0
votes
1 answer
Cond (triad $) not working with a month condition in KDB Q
This basic cond works :
$[8i > 3i ; true;false]
but this does not:
$[mm$.z.d > 3i ; true;false]
I don't understand why, since mm$.z.d (current month) is 8i.

Sithered
- 481
- 7
- 23