For some reason, this really has me stumped. I'm trying to retrieve the max transaction id from the inventory_transaction table, but also need to sum up some costs. As soon as I start adding any of the costs, no matter how I do it, the max(inventory_trans) fails and I get a record for each different cost.
Example - this works:
This doesn't: I get 151 records, rather than the max:
Also doesn't work:
Any help appreciated!