Filter after aggregate function

Options

I have a list of stock transactions that I want to run an api call to aggregate them and only return the currently active holdings. In other words if the sum of all the transactions for a certain company returns a quantity of 0, I would like to filter it out. I can understand how to filter the inputs but not the outputs as simply.

Other than running a bunch of conditional loops, and creating new tables to try and filter this out. Is there a more efficient way to filter the results of the initial query? When I tried doing this before I was sort of able to make a query that worked but it sometimes timed out because the whole function stack just took too long.

Tagged:

Answers

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi,

    You can use update variable to modify the result of the query, You might want to look at high order filters, they a need a bit of js code but in your case it should be very simple one, other way is to use array function to make additional filtering on the initial list from your query.