0% found this document useful (0 votes)
7 views

DBMS Practical Assignment1

Uploaded by

Ananya Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

DBMS Practical Assignment1

Uploaded by

Ananya Jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

ASSIGNMENT-1

Consider the EMP table for the following queries.


DESC EMP

Name Null? Type


EMPNO NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)

ANANYA JAIN MCA 1 A


ANANYA JAIN MCA 1 A
Q1. Retrieve a list of MANAGERS.

Q2. Find out salary of both MILLER and SMITH

Q3. Find out the names and salaries of all employees earning more than 1000
per month

ANANYA JAIN MCA 1 A


Q4. Display the names and salaries of all employees except JAMES.

Q5. List the name and salary of employees who can earn more than 1500 and
are in department 10 or 30. Label the columns Employee and Monthly Salary
respectively.

Q6. List the name and salary for all employees whose salary is not in the
range of 1500 and 2850.

ANANYA JAIN MCA 1 A


Q7. Display the name, job, and salary of all the employees whose job is
CLERK or ANALYST and their salary is not equal to 1000, 3000, or 5000.

Q8. Display the name, salary and commission for all employees whose
commission amount is greater than their salary increased by 10%

Q9. Display the name of all employees who have two Ls in their name and
are in department 30 or their manager is 7782.

Q10. Find out the details of employees whose names begin with ‘S’.

ANANYA JAIN MCA 1 A


Q11. Find out the names of all employees that have ‘A’ anywhere in their
name.

Q12. Find out the names of all employees that have ‘L’ as their third
character in their name

Q13. Find out the names of the employees whose name begin with ‘A’ or ‘M’.

ANANYA JAIN MCA 1 A


Q14. List all the employees whose commission is NULL.

Q15. List employee number, employee name, total salary (i.e. salary +
commission).

Q16. List the name of the employee and designation of the employee, who
does not report to anybody

ANANYA JAIN MCA 1 A


Q17. List employee name and yearly salary and arrange the output on the
basis of yearly salary in descending order.

Q18. Retrieve the departments in ascending order and their employees in


descending order.

Q19. Select the name, job, salary, and department number of all employees
except SALESMAN from department number 30.

ANANYA JAIN MCA 1 A


Q20. List different jobs with no duplicates.

Q21. Count the total number of employees

Q22. Print the total employees and average salary of each department

ANANYA JAIN MCA 1 A


Q23. Select the minimum and maximum salary from EMP table.

Q24. List the minimum and maximum salaries of each department.

Q25. List all departments in which more than 3 employees are working

ANANYA JAIN MCA 1 A

You might also like