Message Oracle PLS-00119 - Duplicate having-clause in table expression

ERRORDuplicate having-clause in table expression
CAUSETwo or more HAVING clauses were found in a SELECT statement. The HAVING clause specifies a condition under which groups of rows (formed by the GROUP BY clause) are included in the result. The condition can include several logical expressions connected by AND or OR, but a statement can contain only one HAVING clause.
ACTIONRemove one of the HAVING clauses and, if necessary, connect logical expressions by AND or OR.