I'm learning Oracle SQL right now and I'm stuck on this problem that keeps saying "Not a group by expression". What am I missing here that is preventing this from working properly?
select e.empid as "ID", e.name as "Employee Name", count(w.pid) as "Total Projects", sum(w.hours) as "Total Hours"
from employee e inner join workon w on e.empid=w.empid
group by e.empid
having e.did = (select did from division where lower(dname) = lower('marketing'))