



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A continuous assessment tool for the course 'introduction to database' at california state university - northridge. The assignment requires students to write sql queries to perform various tasks on a relational database schema consisting of four tables: employee, branch, project, and task. The assignment covers 15 questions that test the students' understanding of sql concepts such as select, where, order by, distinct, between, in, substring, and aggregate functions like avg and count. The assignment is worth 15 marks and is due on may 8, 2024. The relational schema, the list of questions, and the submission guidelines. This assignment could be useful for university students enrolled in an introductory database course as it allows them to practice and demonstrate their sql skills.
Typology: Cheat Sheet
1 / 5
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