Error
SQLCODE -118
Table in FROM not in GROUP BY
Explanation
A column in SELECT is not in GROUP BY clause and not an aggregate function.
Solution
Add the column to GROUP BY or use an aggregate function (SUM, COUNT, MAX, etc.).
Example
SELECT DEPT, NAME FROM EMP GROUP BY DEPT -- NAME needs GROUP BY or aggregate