0% found this document useful (0 votes)
4 views4 pages

Practical No 8 DBMS

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 4

Practical No.

8:- Execute Queries Using the Select Command with where


Having, Group By and Order By Clauses.
Name:-Deepak Yadav
Roll No:-220463
Q.1] Practical Related Questions:-
1. Select emp_no, sum(salary) from Emp e, Dept d where e.emp_no=d.empno
group by dept_name;

2. Select emp_no, dept_name from Dept10 group by Dept_name, Emp_no;

3. Select d.Dept_no, MIN(e.Salary) AS min_Salary from Dept11 d,Emp11 e


where d.emp_no=e.emp_no GROUP BY d.dept_no;

4. Select emp_no, job_type from Dept11 order by Dept_name;


Q.2] Write output of the Following Queries:-
a. Display Minimum Salary of employee from every Department.

b. Display total Salary of every Department.

c. Display the Department having total employees less than 2.

d. Display Details of employees with the Employee name in Ascending Order.


Q.1] Exercise Related Questions:-
a. Display total salary spent for each Job Category

b. Display number of employees working in each department and their


department name.

c. Display the details of employees with the salary in increasing order.

d. Display the details of employees earning salary greater than 60000 from
every department.
e. List the number of employees from every department with sorted order
(Ascending).

f. List the number of employees from every department getting salary more
than 45000.

g. List the employee details of employee working in PRODUCTION department


having salary more than average salary of all the employees.

You might also like