How can I filter results in a query based on aggregated data from a joined table? Add-ons only affect the output so I can't use that. I want to limit the results of the query itself based on totals from a related table. For example, "Return the salesmen who have over 100 sales" ... I realize I could use the add-on and then filter the query results from the aggregated add-on results in a follow-up function. However, these results have paging enabled, so that could create a problem if it grabs the first page of results but then in the post processing none of those salesmen fit the criteria, then it returns 0 results once those get filtered out after the query. That's why I need the filter applied in the query itself. Please advise.
Filter query results on aggregated field from related table
3 replies