Sandra.Ward I presume this query is based on the RESOLUTION business object.
In short it is difficult to do as no standard filter can be used.
The way I would approach is to create a new boolean attribute on the RESOLUTION object called something like “Is Latest Resolution” and create a before save calculation on it. On the calculation set the dependency to the RESOLUTION object and then have a calculation that uses the ”latest” function of a collection to get the latest value and then compare it to the current value; pick an attribute on resolution such as the creation date to do your compare. If they match then return true else return false.
Now you have a field that is TRUE for the latest resolutions and you can then add this check to your query filter to only show these.
The only issue is that a ”before save” calc wont retrofit existing transactions. Here I would temporarily set it to scheduled and run a one-off scheduled job to set for existing transactions and then set back to before save afterwards so new transactions apply correctly. You could try the calc as ”after read” instead but i think these working correctly in a filter may or may not work and also it would be a performance hit as you run the query; “before save“ is better IMHO.
This would be what I’d try out (in test environment) first.