Search code examples
oraclereportoracle-apexinteractive

Oracle APEX Interactive Report Having Clause


Is it possible to add a filter with a having clause in an interactive report ? for eg. if I use the interactive report's Data => Aggregate function. I would like to further refine my results with a having clause on the aggregated value like sum(column_name) > 100

APEX Version: 20.1.0


Solution

  • As far as I can tell, not possible through Interactive Report's "Action" menu.

    Workaround (if you think it'll help) is to modify report's query by adding the SUM function in its analytic form, e.g.

    select empno,
           ename,
           sal,
           --
           sum(sal) over (partition by empno) sumsal       --> this
    from ...
    

    Now you'd be able to include newly added sumsal column into Interactive Report's filter: sumsal > 100