ORA-00904: "SALARY": invalid identifier

Hello all,
I have the next query with the issue ORA-00904: “SALARY”: invalid identifier
Would you help me please?

select job_id, salary
from ( select job_id, max(salary) salaries
from hr. employees
group by job_id
) x ;

try “select job_id, salaries from…” instead.