I just came across a use case, where I could use a <having>-clause in my operationBinding.
I think I can solve it with customSQL as well, but of course it would be nicer in .ds.xml.
Could you note this as enhancement to the declarative grouping and aggregation features from 4.1?
For anyone with a similar problem, my current solution looks like this:
<operationBinding operationType="fetch" operationId="fetchDuplicates" requiresRole="serverOnly" outputs="CSVFIELDNAME">
<customSQL>
SELECT $defaultSelectClause FROM $defaultTableClause
WHERE $defaultWhereClause
GROUP BY csvfieldname
HAVING COUNT(*) > 1
</customSQL>
</operationBinding>