Trying to write a view in oracle 11g
I want this code to return just the fist name and the last name of a employee who has .
But it keeps on giving me the error : "ORA-00979: not a GROUP BY expression"
create or replace view highesttotalcommission as (
select *
from ( select e.firstname|| ' ' ||e.lastname "Highest commission"
from employee e
inner join salesperson sp
on e.employeeID = sp.employeeID
inner join salesinvoice si
on si.salespersonid = e.employeeID
group by si.salespersonid
order by SUM(si.price * sp.commissionpct) desc )
where ROWNUM = 1);