Q_Year
SELECT DISTINCT TO_CHAR (HIREDATE, 'YY') YEAR
FROM EMP

Q_Dept
SELECT DISTINCT DEPTNO
FROM EMP

Q_Job
SELECT DISTINCT JOB
FROM EMP

Q_Salary
SELECT TO_CHAR(HIREDATE, 'YY') YEAR,  DEPTNO,  JOB,
SUM(SAL) FROM EMP
GROUP BY TO_CHAR(HIREDATE, 'YY'),  DEPTNO,  JOB
ORDER BY TO_CHAR(HIREDATE, 'YY'),  DEPTNO,  JOB