Hello
This is on Oracle 12.1
I have a view as follows
create view View_Employee
as
select
Employee_No,
Department_Code,
Site_Code,
Get_Manager(Site_Code, Department_Code) Manager --this is a user defined function
from Employee
I have a simple query that uses the view as follows which groups by the column whose value is generated by the function and that works fine
select
Manager,
count(*) Employee_Count
from View_Employee
group by Manager
But it this doesn't work, does anybody know why?
select * from (
select
Manager,
count(*) Employee_Count
from View_Employee
group by Manager
)
I get error
ORA-00979: not a GROUP BY expression