oracle-统计员工x

 

1、

SELECT
e.depid,avg(s.bonussalary+s.basesalary) AS avgsal from employ e,salary s
where e.employId=s.employId GROUP BY e.depid
ORDER BY avgsal asc

注意顺序 select from where group by oder by

2、

SELECT * from employ e where e.ename like '王%'

posted @ 2017-04-12 17:50  游离的心  阅读(245)  评论(0编辑  收藏  举报