SELECT CONTROL_POINT,RISK_LEVEL,RISK_REMAIN FROM(select CONTROL_POINT,RISK_REMAIN,RISK_LEVEL from RSK_MATRIX
ORDER BY RISK_REMAIN) where RISK_REMAIN=Decode(sign((select remain from RSK_MATRIX t, RSK_USERPOST t1,RSK_RSKPOST t2 where t.DEPT_CODE=t2.DEPT_CODE and t1.DEPT_CODE=t2.DEPT_CODE)-(select remain from RSK_MATRIX_BK t where RISK_INSERT_DATE=)),1,'上升',,-1,'下降',‘0’,‘相等’ ) and ROWNUM <= 5 and RSK_USERPOST.DEPT_CODE=RSK_RSKPOST.DEPT_CODE and t1.RISK_CODE=RSK_RSKPOST.RISK_CODE;
请问下查找前5名数据怎么写?
该贴被嗨嗨嗨你好编辑于2015-5-25 17:00:02