Home › Forums › kdb+ › How can I apply a func to a grouped table? › Reply To: How can I apply a func to a grouped table?
-
I ran into another problem. It seems some AskOrder of the stock has less than 16 data, so it says
‘length
[1] f:{(`$x,/:string 1+til y)!az -1+(where deltas y xrank az:asc z),count z}
What should I do?
I’ve tried to filter out those stock using:
select from t where count each AskOrder > 16 by stock
However, it says
'stock
[3] select from t where count each AskOrder > 16 by stockMy t is like this:
q)t
stock AskOrder BidOrder
-----------------------
p 1 39
e 76 97
k 65 74I’ve also tried to use length:
l: select length: count each AskOrder by stock from t;
l: () xkey lengths;
select stock from l where length > 16;But it says:
'type
[3] select stock from l where length > 16;