Professional Documents
Culture Documents
Database: Task 1
Database: Task 1
Database: Task 1
TASK 1:
Display records of all the employees having salary more than 1000 and they earn commission.
QUERY:
QUERY:
TASK 3:
Display name and salary for all employees whose salary is not in the range of 1500 and 2850.
QUERY:
TASK 4:
Display data of all the employees having “C” in their name.
QUERY:
TASK 5:
Display the name, job title and the department of all employees who do not have a manager.
QUERY:
TASK 6:
Display job title and hire date of employees having commission less than 300. (Note: Commission can be
null)
QUERY:
TASK 7:
Display record of all employees who work in department no 10 with dept no appearing as a first column.
QUERY:
SELECT DEPTNO, EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM FROM EMP
WHERE DEPTNO = 10;
TASK 8:
Display data of all those employees whose name start with T and ends with R.
QUERY:
QUERY:
TASK 10:
Display the record of all the employees who do not earn commission.
QUERY:
WHERE COMM = 0
OR COMM IS NULL;
TASK 11:
Write a query that display the employees that have commission greater than 20% of their salary
QUERY:
TASK 12:
Sort all the employees according to their department number and if department number is same then
according to their hiredate.
QUERY:
TASK 13:
Display Name, department number and salary of all the employees. Sort data according to their salary
from maximum to minimum. (Note: You are not allowed to use column name in condition).
QUERY:
SELECT ENAME, DEPTNO, SAL FROM EMP
ORDER BY 3 DESC;
TASK 14:
Display record of employees whose salary is 3000 or 5000 (Note: You are not allowed to use equal
operator)
QUERY:
TASK 15:
Display the employee name and department number of all employees in departments 10 and 30 in
alphabetical order by name
QUERY: