【发布时间】:2020-03-23 19:46:48
【问题描述】:
我有下表:
t:([]date:.z.d+neg til 100; region:100#(`us`eu`asia`au); product:100#(`car`insurance`loan`other); qty:100?1f);
date region product qty
---------------------------------------
2019.11.28 us car 0.3998898
2019.11.27 eu insurance 0.592308
2019.11.26 asia loan 0.9796166
...
我想要检查qty 是否超过给定阈值,比如0.5,超过n 天,比如3 天。这里days实际上可以是连续观察的数量。
我想按地区检查我拥有的 4 种产品中的每一种。
我考虑过在n 天应用滚动函数,并应用以下函数:
myfunc:{[l]
:all l>0.5;
};
0.5 是我的阈值,但它并没有真正起作用......
【问题讨论】:
标签: group-by kdb rolling-computation