select to_char(hiredate,''MM) from (select deptno,MAX(sal) from emp group by
deptno having deptno = 10);
其中,hiredate為日期字段,sal為工資,deptno為部門號,求大神指點哪裡出了錯誤,
在線等,急!!!!!!!!!!!
select hd,max(sal) from
(
select to_char(hiredate,'yyyymm') hd,sal from emp where deptno=10
) group by hd