Oracle Error QSM-02144: aggregate functions are present without a GROUP BY clause

Oracle Error Message

QSM-02144: aggregate functions are present without a GROUP BY clause

Reason for the Error

One or more aggregate functions are present in the select list but a GROUP BY clause is not used.

Solution

Add a GROUP BY clause.