Sumatra, Ferraris, Garrido - Tsa2
Sumatra, Ferraris, Garrido - Tsa2
Sumatra, Ferraris, Garrido - Tsa2
TECHNICAL ASSESSMENT 2
Part 1:
Instructions: Using the diagram below, write the DDL code to create the following entities into tables.
The relationships of the tables should also be written on the code. You can use SQL developer to solve
this. Copy and paste the codes below. Save the SQL scripts as Tech6_fullname. Save this document as
Tech2Document_fullname.
CREATE TABLE "DBASE3"."TIMECATEGORY"
NOCOMPRESS LOGGING
TABLESPACE "USERS" ;
"COLUMN2" NUMBER,
"COLUMN3" FLOAT(63),
NOCOMPRESS LOGGING
TABLESPACE "USERS" ;
NOCOMPRESS LOGGING
TABLESPACE "USERS" ;
"COLUMN2" DATE,
"ENDDATE" DATE,
NOCOMPRESS LOGGING
TABLESPACE "USERS" ;
Part 2:
Answer the following numbers using the table given. Use SQL developer to solve this.
Save the SQL script as: Tech7_fullname. Make sure you make the questions in the worksheet as
comments.
Then copy your answer and paste your code below each number in this document.
Use the table above to answer the following by writing the SQL code. Do this code in sequential
order. Each number is related to the previous number.
Use the table above to answer the following by writing the SQL code. Do this code in sequential
order. Each number is related to the previous number.
job_id varchar2(10),
job_title varchar2(35),
min_salary number(6,0),
max_salary number(6,0),
)
2. Add a new column on the table named job_category that accepts a string and it can be
null.
4. Show the all the jobid, job title, the sum of the minimum salaries of the employees and
the average of the minimum salaries of the employees that has an job title that ends
with “Representative”. Group it by their job_ids and job_titles. Show only the sum of the
MIN_salaries that are less than 5000. Then arrange it by job_id. (Then draw the table of
the result).
Student
Student
Enrollment
StudentId StudName Age
EnrollmentId EnrollmentDate StudentId SubjId
A Mark 18 E100 Oct – 10 - 2015 A 1
B Matthew 17 E101 Oct – 11 - 2015 B 2
C Ruth 20 E102 Nov – 10 - 2015 C 3
E103 Dec – 15 – 2015 D 1
D John 15
E104 Feb – 1 – 2015 E 3
E Sally 18
E105 Mar – 10 – 2015 F 2
F James 17
Subject
SubjId SubjDescription Units Priceperunit
1 Math 3 400
2 Science 2 500
3 History 1 250
1.)