用户名: 密码: 企业 个人
当前位置:89学习网范文文章招聘应聘笔试oracle经典20道笔试题» 正文

oracle经典20道笔试题

[10-16 20:00:41]   来源:http://www.89xue.com  笔试   阅读:90
摘要:select job,min(sal) from emp group by job17.列出各个部门的MANAGER(经理)的最低薪金。select deptno,min(sal) from emp where job=’MANAGER’ group by deptno18.列出所有员工的年工资,按年薪从低到高排序。select empno,ename,sal*12 as 年薪 from emporder by sal19. 求各种工作工资最低的员工。方法一:select * from emp awhere sal=(select min(sal) from emp b where b.j。
oracle经典20道笔试题,标签:笔试范文,http://www.89xue.com

  select job,min(sal) from emp group by job

  17.列出各个部门的MANAGER(经理)的最低薪金。

  select deptno,min(sal) from emp where job=’MANAGER’ group by deptno

  18.列出所有员工的年工资,按年薪从低到高排序。

  select empno,ename,sal*12 as 年薪 from emp

  order by sal

  19. 求各种工作工资最低的员工。

  方法一:

  select * from emp a

  where sal=(select min(sal) from emp b where b.job=a.job)

  方法二:

  select emp.*

  from emp a,( select job,min(sal) min_sal from emp group by job) b

  where a.job=b.job and a.sal=b.min_sal

  20. 列出各种工作工资前3名的员工

  select * from (

  select empno,ename,sal,job,

  dense_rank() over(partition by job order by sal desc) as 名次

  from emp ) a

  where a.名次<=2

  order by job;

  说明:用到了Oracle强大的“分区排名技术”,其中“dense_rank()”是Oracle的解析函数。

上一页  [1] [2] 


Tag:笔试笔试范文招聘应聘 - 笔试