如何查询此 table 以从交易品种列表中选择?
How to I query this table to pick from the symbol list?
我想从符号列表中过滤掉包含 `1 的记录
示例table:
tab:([]a:((``1`2);`a;b);c:1 2 3);
我试过这个:
select from tab where a = `1
还有这个:
select from tab where `1 in raze a
None 这些工作。
嘿,你的选项卡出现 'b
错误,所以我换了 b->3
q)tab
a c
-------
``1`2 1
`a 2
3 3
q)select from tab where max each`1~''a
a c
------
1 2 1
q)select from tab where not max each`1~''a
a c
----
`a 2
3 3
如果你有 table:
q)tab:([]a:((``1`2);`a;`b);c:1 2 3)
q)tab
a c
-------
``1`2 1
`a 2
`b 3
您可以结合使用关键字 in
和 each right 来删除所需的行:
q)select from tab where not `1 in/: a
a c
---
a 2
b 3
我想从符号列表中过滤掉包含 `1 的记录
示例table:
tab:([]a:((``1`2);`a;b);c:1 2 3);
我试过这个:
select from tab where a = `1
还有这个:
select from tab where `1 in raze a
None 这些工作。
嘿,你的选项卡出现 'b
错误,所以我换了 b->3
q)tab
a c
-------
``1`2 1
`a 2
3 3
q)select from tab where max each`1~''a
a c
------
1 2 1
q)select from tab where not max each`1~''a
a c
----
`a 2
3 3
如果你有 table:
q)tab:([]a:((``1`2);`a;`b);c:1 2 3)
q)tab
a c
-------
``1`2 1
`a 2
`b 3
您可以结合使用关键字 in
和 each right 来删除所需的行:
q)select from tab where not `1 in/: a
a c
---
a 2
b 3