create table emp(
empno number(4,0),
ename varchar2(10),
job varchar2(9),
mgr number(4,0),
hiredate date,
sal number(7,2),
comm number(7,2),
deptno number(2,0)
);
create table dept(
deptno number(2,0),
dname varchar2(20),
loc varchar2(20)
);
insert into emp(empno,ename,job,mgr,hiredate,sal,deptno)
values(7369,'SMITH','CLERK',7902,to_date('1980/12/17','YYYY/MM/DD'),800.00,20);
insert into emp(empno,ename,job,mgr,hiredate,sal,comm,deptno)
values(7499,'ALLEN','SALESMAN',7698,to_date('1981/2/20','YYYY/MM/DD'),1600.00,300.00,30);
insert into emp(empno,ename,job,mgr,hiredate,sal,comm,deptno)
values(7521,'WARD','SALESMAN',7698,to_date('1981/2/22','YYYY/MM/DD'),1250.00,500.00,30);
insert into emp(empno,ename,job,mgr,hiredate,sal,deptno)
values(7566,'JONES','MANAGER',7839,to_date('1981/4/2','YYYY/MM/DD'),2975.00,20);
insert into emp(empno,ename,job,mgr,hiredate,sal,comm,deptno)
values(7654,'MARTIN','SALESMAN',7698,to_date('1981/9/28','YYYY/MM/DD'),1250.00,1400.00,30);
insert into emp(empno,ename,job,mgr,hiredate,sal,deptno)
values(7698,'BLAKE','MANAGER',7839,to_date('1981/5/1','YYYY/MM/DD'),2850.00,30);
insert into emp(empno,ename,job,mgr,hiredate,sal,deptno)
values(7782,'CLARK','MANAGER',7839,to_date('1981/6/9','YYYY/MM/DD'),2450.00,10);
insert into emp(empno,ename,job,mgr,hiredate,sal,deptno)
values(7788,'SCOTT','ANALYST',7566,to_date('1987/4/19','YYYY/MM/DD'),3000.00,20);
insert into emp(empno,ename,job,hiredate,sal,deptno)
values(7839,'KING','PRESIDENT',to_date('1981/11/17','YYYY/MM/DD'),5000.00,10);
insert into emp(empno,ename,job,mgr,hiredate,sal,comm,deptno)
values(7844,'TURNER','SALESMAN',7698,to_date('1981/9/8','YYYY/MM/DD'),1500.00,0.00,30);
insert into emp(empno,ename,job,mgr,hiredate,sal,deptno)
values(7876,'ADAMS','CLERK',7788,to_date('1987/5/23','YYYY/MM/DD'),1100.00,20);
insert into emp(empno,ename,job,mgr,hiredate,sal,deptno)
values(7900,'JAMES','CLERK',7698,to_date('1981/12/3','YYYY/MM/DD'),950.00,30);
insert into emp(empno,ename,job,mgr,hiredate,sal,deptno)
values(7902,'FORD','ANALYST',7566,to_date('1981/12/13','YYYY/MM/DD'),3000.00,20);
insert into emp(empno,ename,job,mgr,hiredate,sal,deptno)
values(7934,'MILLER','CLERK',7782,to_date('1982/1/23','YYYY/MM/DD'),1300.00,10);
insert into dept values(10,'ACCOUNTING','NEW YORK');
insert into dept values(20,'RESEARCH','DALLAS');
insert into dept values(30,'SALES','CHICAGO');
insert into dept values(40,'OPERATIONS','BOSTON');