How to fix the Oracle error PLS-00604: aggregate function is not allowed here?

In this post, you’ll learn more about the Oracle ErrorPLS-00604: aggregate function is not allowed here with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

PLS-00604: aggregate function is not allowed here

Reason for the Error PLS-00604: aggregate function is not allowed here

One of the functions, such as AVG, COUNT, MAX, MIN, SUM, STDDEV or VARIANCE, was used in a WHERE or GROUP BY clause

How to fix the Error PLS-00604: aggregate function is not allowed here ?

You can fix this error in Oracle by following the below steps

Remove the group function from the WHERE or GROUP BY clause. The desired result may be achieved by including the function in a subquery or HAVING clause.

Tags :

Leave Your Comment