Hi @kal8na
I believe the problem is within your badTrades variable you do not provide the classifyTrades function with a parameter.
To fix this, simply pass in the tradeContext table into the function:
badTrades: select from classifyTrades[tradeContext] where exQuality = 0b;
Let me know if this works!
Thanks,
Megan