0% found this document useful (0 votes)
27 views9 pages

Dbms Worksheet 1.2 - Updated

This document outlines experiments performed with the SELECT clause in SQL, including finding minimum, maximum, and average salaries, differences between salaries, filtering results by conditions, grouping data, ordering results, and performing aggregate functions. Queries were written on sample employee, student, and banking databases to showcase usage of clauses like WHERE, ORDER BY, BETWEEN, LIKE, GROUP BY, and HAVING. The learning outcomes were understanding various SQL clauses and how to sort and filter database results based on conditions.

Uploaded by

aniket9631.ash
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)
27 views9 pages

Dbms Worksheet 1.2 - Updated

This document outlines experiments performed with the SELECT clause in SQL, including finding minimum, maximum, and average salaries, differences between salaries, filtering results by conditions, grouping data, ordering results, and performing aggregate functions. Queries were written on sample employee, student, and banking databases to showcase usage of clauses like WHERE, ORDER BY, BETWEEN, LIKE, GROUP BY, and HAVING. The learning outcomes were understanding various SQL clauses and how to sort and filter database results based on conditions.

Uploaded by

aniket9631.ash
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
You are on page 1/ 9

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING

Experiment Title-1.2

Student Name: ANIKET KUMAR UID:21BCS10117


Branch: BE-CSE Section/Group:906-B
Semester:3RD Date of Performance:
Subject Name: DBMS Subject Code:

Aim/Overview of the practical:


To explore “SELECT” clause using where, order by, between, like, group
by, having etc.

Q1. Consider a relation Employee with following attributes:


Name Null Type
-------------------------------- ----------------------- -------------------------
EMPNO NOT NULL NUMBER(4),ENAME VARCHAR2(10) ,JOB VARCHAR2(9) ,MGR
NUMBER(4),HIREDATE DATE ,SAL NUMBER(7,2),COMM NUMBER(7,2) ,DEPTNO
NUMBER(3) ,AGE NUMBER(3),ESAL NUMBER(10).

a. List minimum , maximum , average salaries of employee.


Source Code:
Result/Output

b. What is the difference between maximum and minimum salaries of employees in the
organization?
Source Code:

Result/Output

c. Display all employee names and salary whose salary is greater than minimum salary
of the company and job title starts with ‘M’.
Source Code:

Result/Output

d. Display total salary spent for each job category.


Source Code:
Result/Output

e. Display lowest paid employee details under each manager.


Source Code:

Result/Output

Q2. create table emp with attributes (eid number,ename varchar2(10),age


number,salary number);

a. Count number of employee names from employee table.


Source Code:
Result/Output

b. Display the Sum of age employee table.


Source Code:

Result/Output

c. Find grouped salaries of employees (group by clause).


Source Code:

Result/Output

d. Find salaries of employee in Ascending Order (order by clause).


Source Code:
Result/Output

e. Find salaries of employee in Descending Order.


Source Code:

Result/Output

Q3. Consider the database for a college. Write the query for the following.
Insert at least 5 tuples into each table.
a. List the details of students in the ascending order of date of birth
Source Code:

Result/Output

b. Display the details of students from computer department


Source Code:

Result/Output

c. List the faculties in the descending order of salary


Source Code:
Result/Output

d. Display the total number of students in each department


Source Code:

Result/Output

Q4. Consider the database for a banking enterprise. Write the queries for the below
questions.
Insert at least 5 tuples in each table

a. Display the branch details


Source Code:

Result/Output
b. List the customers of ‘Mumbai’ city
Source Code:

Result/Output

c. List the male customers of ‘chennai’ city


Source Code:

Result/Output

d. List the deposit schemes provided by the bank to the customers


Source Code:

Result/Output
Learning outcomes (What I have learnt):

1. Learned various clause used in DBMS.

2.Learned sorting of data in data base

3.Learned finding data based on different condition.

You might also like