USE THESE TWO TABLES TO WRITE SQL STATEMENTS FOR THE FOLLOWING: DEPT DEPTNO DNAME LOC 10 ACCOUNTING NEW YORK 20 RESEARCH
Posted: Fri May 20, 2022 10:54 am
USE THESE TWO TABLES TO WRITE SQL STATEMENTS FOR THE FOLLOWING:
DEPT
DEPTNO
DNAME
LOC
10
ACCOUNTING
NEW YORK
20
RESEARCH
DALLAS
30
SALES
CHICAGO
EMP
EMPNO
ENAME
JOB
MGR
HIREDATE
SAL
DEPTNO
7369
SMITH
CLERK
7902
17-DEC-80
800
20
7499
ALLEN
SALESMAN
7698
20-FEB-81
1600
30
7654
MARTIN
SALESMAN
7698
28-SEP-81
1250
30
7698
BLAKE
MANAGER
7839
01-MAY-81
2850
30
7782
CLARK
MANAGER
7839
09-JUN-81
2450
10
7788
SCOTT
ANALYST
7566
19-APR-87
3000
20
3.1. Display all information in the table EMP. (2)
3.2. Display all information in the table DEPT. (2)
3.3. Display the names and salaries of all employees with a salary less than 1000. (2)
3.4. Display the names and hire dates of all employees. (3)
3.5. Display the department number and number of clerks in each department. (3)
DEPT
DEPTNO
DNAME
LOC
10
ACCOUNTING
NEW YORK
20
RESEARCH
DALLAS
30
SALES
CHICAGO
EMP
EMPNO
ENAME
JOB
MGR
HIREDATE
SAL
DEPTNO
7369
SMITH
CLERK
7902
17-DEC-80
800
20
7499
ALLEN
SALESMAN
7698
20-FEB-81
1600
30
7654
MARTIN
SALESMAN
7698
28-SEP-81
1250
30
7698
BLAKE
MANAGER
7839
01-MAY-81
2850
30
7782
CLARK
MANAGER
7839
09-JUN-81
2450
10
7788
SCOTT
ANALYST
7566
19-APR-87
3000
20
3.1. Display all information in the table EMP. (2)
3.2. Display all information in the table DEPT. (2)
3.3. Display the names and salaries of all employees with a salary less than 1000. (2)
3.4. Display the names and hire dates of all employees. (3)
3.5. Display the department number and number of clerks in each department. (3)