0% found this document useful (0 votes)
28 views7 pages

Assignment 1 Ans

This document contains an assignment submitted by Takrim Elahi Chowdhury to their professor Shafkat Kibria for their Database Management System course. The assignment contains 10 SQL queries performed on the hr.Employees and hr.Departments tables to retrieve employee information like name, salary, hire date, job, and department.

Uploaded by

Takrim Chowdhury
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)
28 views7 pages

Assignment 1 Ans

This document contains an assignment submitted by Takrim Elahi Chowdhury to their professor Shafkat Kibria for their Database Management System course. The assignment contains 10 SQL queries performed on the hr.Employees and hr.Departments tables to retrieve employee information like name, salary, hire date, job, and department.

Uploaded by

Takrim Chowdhury
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/ 7

Leading University, Sylhet

Department of Computer Science & Engineering

Assignment
Course Code: CSE-2320
Course Title: Database Management System Sessional

Submitted To
Shafkat Kibria
Assistant Professor & Head (Acting)
Department of CSE
Leading University, Sylhet.

Submitted By:
Name: Takrim Elahi Chowdhury
ID No: 2012020205
Section: 5(E), 53rd Batch
Department of CSE
Date of Submission: 28.12.2021
1
select JOB_ID as "Job_Name",FIRST_NAME||' '||LAST_NAME as
"Employee_Name", Salary
from hr.Employees
where last_name like'%s'
3
select EMPLOYEE_ID as "Employee_No", FIRST_NAME|| ' ' ||
LAST_NAME as "Employee_Name" , JOB_ID as "Job_Name", HIRE_DATE
as Hired_Date, Salary, DEPARTMENT_NAME
from hr. Employees, hr. Departments
where to_Char(HIRE_DATE,'YYYY') = '2001' ;

4
Select DEPARTMENT_NAME, FIRST_NAME || ' ' || LAST_NAME as
"Employee_Name" , Salary
from hr. Employees, hr.Departments
where to_Char(HIRE_DATE,'YYYY') = '2001' ;
5
select DEPARTMENT_NAME, Salary As Summaraized_Salary
from hr. Employees, hr. Departments
where JOB_ID like 'M%'
order by DEPARTMENT_NAME;

6
select DEPARTMENT_NAME, FIRST_NAME || ' ' || LAST_NAME as
"Employee_Name", Salary
from hr. Employees, hr. Departments
where FIRST_NAME || ' ' || LAST_NAME like '%E%'
order by DEPARTMENT_NAME;
7
select EMPLOYEE_ID as "Employee_No", FIRST_NAME || ' ' ||
LAST_NAME as "Employee_Name" , Salary, HIRE_DATE AS Hired_Date,
DEPARTMENT_NAME
from hr. Employees, hr. Departments
where to_Char(HIRE_DATE,'YYYY')Between 2001 and 2002 ;

8
select DEPARTMENT_NAME, FIRST_NAME|| ' ' || LAST_NAME as
"Employee_Name", Salary
from hr. Employees, hr. Departments
where to_Char(HIRE_DATE,'YYYY')Between 2001 and 2002 ;
9
select EMPLOYEE_ID as "Employee_No", FIRST_NAME || ' ' ||
LAST_NAME as "Employee_Name" , JOB_ID, Salary, HIRE_DATE AS
Hired_Date, DEPARTMENT_NAME
from hr. Employees, hr. Departments
where JOB_ID like '%CLERK%';

10
select DEPARTMENT_NAME, FIRST_NAME || ' ' || LAST_NAME as
"Employee_Name", Salary
from hr. Employees, hr. Departments
where JOB_ID like '%CLERK%';

You might also like