0% found this document useful (0 votes)
10 views3 pages

Dbms Lab Internal

The document outlines a series of database queries related to employee management within a Database Management System lab. It includes tasks such as listing employees by department, filtering by salary, and aggregating salary data. Each section presents specific queries to extract various employee details based on different criteria.

Uploaded by

mmeena2203
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Dbms Lab Internal

The document outlines a series of database queries related to employee management within a Database Management System lab. It includes tasks such as listing employees by department, filtering by salary, and aggregating salary data. Each section presents specific queries to extract various employee details based on different criteria.

Uploaded by

mmeena2203
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Name of the Lab: Database Management System Subject Code:

22MCA0108
1. [Link] the employees belonging to the department 20 Des Sourcecod Exe TO
a [Link] the name and salary of the employees whose salary is more than 1000 2 e c T
[Link] employee number and name of managers 3 5 10
[Link] the names of the clerks working in the department 20
[Link] the names of analysts and salesmen

Name of the Lab: Database Management System Subject Code:


22MCA0108
2. 1. List the details of the employees who have joined before the end of Des Sourcecod Exe TO
a September 1981 2 e c T
2. List the name of employees who are not managers 3 5 10
3. List the name of the employees whose employee numbers are 7369, 7521,
7839, 7934, 7788
4. List the employee details not belonging to the department 10, 30 and 40
5. List the employee name and salary, whose salary is between 1000 and
2000

Name of the Lab: Database Management System Subject Code:


22MCA0108
3. 1. List employee names who have joined before 30th June 1981 and after Des Sourcecod Exe TO
a December1981 2 e c T
2. List the different jobs (designations) available in emp table 3 5 10
3. List the employee names who are not eligible for commission
4. List the name of the employee and job of the employee who does not report
to anybody (managers is NULL)
5. List the employees not assigned to any department

Name of the Lab: Database Management System Subject Code:


22MCA0108
4. 1. List the employees who are eligible for commission Des Sourcecod Exe TO
a 2. List the details of employees whose salary is greater than 2000 and 2 e c T
commission is null. 3 5 10
3. List the employees whose names start with an “S”
4. List the employees whose names ending with “S”
5. List the names of employees whose names have exactly 5 characters

Name of the Lab: Database Management System Subject Code:


22MCA0108
5. 1. List the employee names having ‘I’ as the second character Des Sourcecod Exe TO
a 2. List the name, salary and PF amount of all the employees (PF is calculated 2 e c T
as 10% of salary) 3 5 10
3. List the names of employees who are more than 25 years old in the
organization
4. List the empno, ename, sal in ascending order of salary
5. List the empno, ename, sal, hiredate in descending order of hiredate.

Name of the Lab: Database Management System Subject Code:


22MCA0108
6. 1. List the employee name, Salary, job and department no. in ascending order Des Sourcecod Exe TO
a of deptno and then on descending order of salary 2 e c T
2. List the employee details in ascending order of salary 3 5 10
3. List the employee name, salary, PF, HRA, DA and gross; order the result in
ascending order of gross. HRA is 50% of salary and DA is 30% of salary
4. List the number of employees working with the company
5. List the number of jobs available in the emp table

Name of the Lab: Database Management System Subject Code:


22MCA0108
7. 1. List the total salaries payable to employees Des Sourcecod Exe TO
a 2. List the maximum salary of employees working as a salesman 2 e c T
3. List the minimum salary from emp table 3 5 10
4. List the average salary and number of employees working in the
department 20
5. List the deptno(s) and number of employees in each department

Name of the Lab: Database Management System Subject Code:


22MCA0108
8. 1. List the department number and the total salary payable in each Des Sourcecod Exe TO
a department 2 e c T
2. List the jobs and the number of employees in each job. The result should be 3 5 10
in descending order of the number of employees:
3. List the total salary, maximum, minimum and the average salary of
employees job wise
4. List the average salary from each job excluding managers
5. List the total salary, maximum, minimum and the average salary of
employees job-wise, for department number 20 only

Name of the Lab: Database Management System Subject Code:


22MCA0108
9. 1. List the average salary for each job type within department Des Sourcecod Exe TO
a 2. List average salary for all departments employing more than five people 2 e c T
3. List jobs of all the employees where maximum salary is >= 5000 3 5 10
4. List the total salary, maximum, minimum and the average salary of
employees jobwise, for department number 20 only and display only those
rows having average salary greater than 1000
5. List the total salary, maximum, minimum and the average salary of
employees jobwise, for department number 20 only and display only those
rows having average salary greater than 1000, the output should be arranged
in the ascending order of SUM(sal)

Name of the Lab: Database Management System Subject Code:


22MCA0108
10. 1. List the deptno(s) and names in department name order. De Sourcecod Exe TO
a 2. List the details of employees in departments 10 and 20 in alphabetical s e c T
order of name 2 3 5 10
3. List names and jobs of all clerks in department 20 in alphabetical order of
name
4. List the names of all employees who have LL and LT in their names
5. List names and total remuneration for all employees

You might also like