Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Enhancement: HAVING clause for declarative grouping and aggregation

    Hi Isomorphic,

    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?

    Thank you & Best regards
    Blama

  • #2
    For anyone with a similar problem, my current solution looks like this:
    Code:
    <operationBinding operationType="fetch" operationId="fetchDuplicates" requiresRole="serverOnly" outputs="CSVFIELDNAME">
        <customSQL>
            SELECT $defaultSelectClause FROM $defaultTableClause
            WHERE $defaultWhereClause
            GROUP BY csvfieldname
            HAVING COUNT(*) > 1
        </customSQL>
    </operationBinding>

    Comment


    • #3
      A feature similar to this is already being tracked as a possible enhancement.

      Thanks for sharing the code to do it via customSQL.

      Comment

      Working...
      X