2DG1 AniagJohnRay Act2
2DG1 AniagJohnRay Act2
BSIT 2DG1
--1--
create database AniagJohnRaySQL
use AniagJohnRaySQL
--4--
insert into College
values ('CAL', 'College of Arts & Letters'),
('CICT', 'College of Information & Communication Technology'),
('CIT', 'College of Industrial Technology'),
('COE', 'College of Engineering'),
('CON', 'College of Nursing')
--5a--
select FirstName, LastName, Position from Faculty
--5b--
select Position+' ' +FirstName+' ' +LastName as "List of Deans" from Faculty
--5c--
select FirstName, LastName, Salary * 0.25 as "TAX" from Faculty
--5d--
select FirstName, LastName, Salary - (Salary *0.25) as "Deducted by TAX " from Faculty
--5e--
select FirstName,ColCode LastName from Faculty where ColCode = 'CON'
--5f--
select FirstName+' '+MiddleName+' '+LastName+'is holding position '+ EmpRank as "Name of
Faculty and their Rank"
from Faculty
order by LastName
--5g--
select FirstName+' '+MiddleName+' '+LastName+'is holding position '+ EmpRank as "Name of
Faculty and their Rank"
from Faculty
where EmpRank like '%Professor%'
order by LastName
--5h--
select FirstName, MiddleName, Lastname, ColCode, Salary from Faculty
where Salary >00000 and ColCode ='CICT'
--5i--
select FirstName, MiddleName, LastName, ColCode, EmpRank from Faculty
where ColCode between 'COE' and 'CON' and RATA is not null
--5j--
select FirstName, LastName, EmpRank from Faculty
where ColCode = 'CICT' and HireDate between '01-01-2000' and '12-31-2005'