inner join with group by expression in oracle sql [duplicate]
The error message is a bit misleading. When you select
a bunch of fields and an aggregate, you have to group by
every field you select
and only the fields you select
. So your query has to be:
select j.job_title, e.job_ID, count(e.job_ID)from employees e, jobs jwhere e.job_id=j.job_idgroup by e.job_Id, j.job_title