



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




In Academic Affiliation with California State University – Northridge
Question No.
Marks Obtained (^) Maximum
Marks
Comments if any O1 O2 O3 O4 O5 O
Outcomes Total / 15
Total Marks(in figures) Total Marks(in words)
Evaluator’s Signature
Internal Moderator’s
Signature
External Moderator’s
Signature
tool:
O6. Develop database system using basic command and function of SQL
In this assignment, you are required to write the SQL code for the given questions.
The following is the relational schema of part of the database that Saas Pty Ltd recently implemented:
[O6] [15 Marks]
Employee (EmployeeId, Name, Country, Phone, Email, Fax, Salary, BranchNo)
Branch (BranchNo, BranchName, Phone, Fax, Location, Address)
Project (ProjectId, Title, Duration, Location, Extension, Cost)
Task (EmployeeId, ProjectId, StartDate, CompletionDate)
Using the above schema, write SQL queries that will answer/process the following:
SELECT name, country, phone
From Employee;
SELECT E.EmployeeId, E.fax, P.title
From employee as E, project as P, task as T
Where E.EmployeeId=T.EmplyeeId and
T.projectId=P.projectId;
SELECT projectId, Duration, Location
WHERE LOCATION IN (‘Salalah’, ‘SUR’, ‘NIZWA’);
SELECT E.employeeId, E.name, B.Branchname
FROM Employee as E, Branch as B
Where B.BranchNo=E.BranchNo;
in descending order. [1 Mark]
FROM Branch
ORDER BY Location, Address DESC;
SELECT AVG (Salary)
FROM Employee;
FORM Project;
You are required to submit a soft copy (pdf file) of your assignment which contains SQL code for the
given task through Moodle.
No_._ Assessment Criteria Marks
3 Task: SQL
Total Mark / 15
End of document