From listbox+trampoline+Q4+EFZ7+9D7yPaCh4BGh-rascMt-2g+BqUXUH@jeeves.archives.listbox.com  Tue Jun 28 12:02:14 2011

Hello Q gods and goddesses,

Please could you advise on the following problem: I have grouped a table
by its id and want to filter out a specific event,`A, with a
corresponding qty of 0 (shares the same index position); my grouped
table is similar to this:

([id:til 3]event:(`A`B`C;`A`B`C;`A`B`C);qty:(til 3;3-til 3;3#3)

I tried something on the lines of "select ... where (not `A in) each
event,(not 0 in) each qty" but it's not quite correct as it will filter
out where 0 and `A exist but it might not be in the same index position.

Cheers,
James.=20


From listbox+trampoline+Q4+EFZ7+Ss7DVqih4BGC241ztDYChA+BqUXUH@jeeves.archives.listbox.com  Tue Jun 28 13:05:29 2011


select from ttbl where not any each ((`A = ) each event) and ((0 = ) 
each qty)

You get a boolean matrix out of each condition in parenthesis, and out 
of the "and";
then the "any each" combines them along each group.

-Ali

Ali Soleimani
Automated Trading Desk, A Citi Company
asoleimani@atdesk.com

