Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Assignment 001 - IT6202 - Database Management System 1: Feedback

Download as pdf or txt
Download as pdf or txt
You are on page 1of 80

Assignment 001 - IT6202 - Database Management

System 1

Which of the following is the correct example of creating a new table STUDENTS? The column
STUD_ID is set to primary key.
Select one:

a. CREATE TABLE STUDENTS( STUD_ID NUMBER(3) datatypePRIMARY KEY);

b. CREATE TABLE STUDENTS( STUD_ID NUMBER(3) PRIMARY KEY);

c. CREATE TABLE STUDENTS( STUD_ID NUMBER(3) pk);

d. CREATE STUDENTS( STUD_ID NUMBER(3) PRIMARY KEY);

Check

Feedback
Which of the following is the correct example of removing a column SALARY from
EMPLOYEES table?
Select one:

a. ALTER EMPLOYEES

DROP SALARY;

b. ALTER TABLE EMPLOYEES

DROP COLUMN SALARY;

c. ALTER EMPLOYEES

DROP COLUMN SALARY;

d. ALTER TABLE EMPLOYEES

DROP SALARY;

Check
Feedback
Which of the following is the correct example of truncating the table EMPLOYEES?
Select one:

a. TRUNCATE EMPLOYEES;

b. ALTER TABLE TRUNCATE TABLE EMPLOYEES;

c. TRUNCATE TABLE EMPLOYEES;

d. ALTER TABLE TRUNCATE EMPLOYEES;

Check

Feedback
Which of the following is the correct example of modifying the column JOB_ID? Change the
datatype size to 10.
Select one:

a. ALTER TABLE EMPLOYEES

MODIFY SET JOB_ID CHAR(10);

b. ALTER EMPLOYEES

MODIFY SET JOB_ID CHAR(10);

c. ALTER TABLE EMPLOYEES

MODIFY JOB_ID CHAR(10);

d. ALTER EMPLOYEES

MODIFY JOB_ID CHAR(10);

Check

Feedback
Which of the following is the correct example of renaming the table EMPLOYEES to
WORKERS?
Select one:

a. RENAME TABLE EMPLOYEES TO WORKERS;


b. RENAME EMPLOYEES AS WORKERS;

c. RENAME EMPLOYEES TO WORKERS;

d. ALTER TABLE RENAME EMPLOYEES TO WORKERS;

Check

Feedback
Which of the following is the correct example of removing a column FIRSTNAME from
EMPLOYEES table?
Select one:

a. ALTER EMPLOYEES

FROM COLUMN FIRSTNAME;

b. ALTER EMPLOYEES

FROM N FIRSTNAME;

c. ALTER TABLE EMPLOYEES

DROP COLUMN FIRSTNAME;

d. ALTER TABLE EMPLOYEES

DROP FIRSTNAME;

Check

Feedback
Which of the following is the correct example of dropping the table EMPLOYEES?
Select one:

a. DROP EMPLOYEES;

b. ALTER TABLE DROP TABLE EMPLOYEES;

c. ALTER TABLE DROP EMPLOYEES;

d. DROP TABLE EMPLOYEES;


Check

Feedback
Which of the following is the correct example of modifying the column lastname? Change the
datatype size to 20.
Select one:

a. ALTER EMPLOYEES

MODIFY LASTNAME VARCHAR(20);

b. ALTER EMPLOYEES

SET LASTNAME = VARCHAR(20);

c. ALTER TABLE EMPLOYEES

MODIFY LASTNAME VARCHAR(20);

d. ALTER TABLE EMPLOYEES

SETLASTNAME =VARCHAR(20);

Check

Feedback
Which of the following is the correct example of adding a new column ADDRESS
datatypevarchar size 20 to EMPLOYEES table?
Select one:

a. ALTER TABLE EMPLOYEES

ADD COLUMN ADDRESS VARCHAR(20);

b. ALTER TABLE EMPLOYEES

ADD ADDRESS VARCHAR(20);

c. ALTER EMPLOYEES

ADD ADDRESS VARCHAR(20);


d. ALTER TABLE EMPLOYEES

SET ADDRESS VARCHAR(20);

Check

Feedback
Which of the following is the correct example of adding a new column
CONTACT_NOdatatypeNUMBER size 11 to EMPLOYEES table?
Select one:

a. ALTER TABLE EMPLOYEES

ADD CONTACT_NO NUMBER;

b. ALTER EMPLOYEES

ADD CONTACT_NO NUMBER(11);

c. ALTER TABLE EMPLOYEES

ADD COLUMN CONTACT_NO NUMBER(11);

d. ALTER TABLE EMPLOYEES

ADD CONTACT_NO NUMBER(11);

Check

Which of the following is the correct example inserting a new value to STUDENTS table that will
only add new data to STUD_ID and LASTNAME? The stud_id is 10 and lastname is ‘CRUZ’
Select one:

a. INSERT INTO STUDENTS VALUES (A0,’CRUZ’);

b. INSERT INTO STUDENTS(STUD_ID,LASTNAME)

VALUES(10,’CRUZ’);

c. INSERT INTO STUDENTS VALUES (STUD_ID,LASTNAME)


(10,’CRUZ’);

d. INSERT INTO STUDENTS (A0,’CRUZ’);

Check

Feedback
Which of the following is the correct example of deleting a student record from STUDENTS
table whose COURSE is equal to NULL;
Select one:

a. DELETE FROM STUDENTS

WHERE COURSE = ‘NULL’;

b. DELETE FROM STUDENTS

WHERE COURSE IS NULL;

c. DELETE * FROM STUDENTS

WHERE COURSE IS NULL;

d. DELETE FROM STUDENTS

WHERE COURSE IS =NULL;

Check

Feedback
Which of the following is the correct example of inserting new values to STUDENTS table where
the course is set to NULL;
Select one:

a. INSERT INTO STUDENTS (1,'DELA CRUZ','JUANITO',NULL);

b. INSERT INTO STUDENTS VALUES(1,'DELA CRUZ','JUANITO',NULL);

c. INSERT INTO STUDENTS VALUES(1,'DELA CRUZ','JUANITO','NULL');

d. INSERT INTO STUDENTS (1,'DELA CRUZ','JUANITO','NULL');

Check
Feedback
Which of the following is the correct example of updating the LASTNAME to ‘REYES’ of all
students from STUDENTS table whose STUD_ID is equal to 01020564?
Select one:

a. UPDATE TABLE STUDENTS

SET STUD_ID = 01020564;


WHERE LASTNAME = ‘REYES’;

b. UPDATE STUDENTS

SET LASTNAME = ‘REYES’


WHERE STUD_ID = 01020564;

c. UPDATE TABLE STUDENTS

SET LASTNAME = ‘REYES’


WHERE STUD_ID = 01020564;

d. UPDATE STUDENTS

SET STUD_ID = 01020564;


WHERELASTNAME = ‘REYES’;

Check

Feedback
Which of the following is the correct example of deleting all records in STUDENTS table;
Select one:

a. DROP TABLE STUDENTS;

b. DELETE FROM STUDENTS;

c. DELETE * FROM STUDENTS;

d. DELETE TABLE STUDENTS;

Check

Feedback
Which of the following is the correct example of inserting new values to STUDENTS table?
Select one:

a. INSERT INTO STUDENTS VALUES(1,DELA CRUZ,JUANITO,BSIT);

b. INSERT INTO STUDENTS VALUES(1,'DELA CRUZ','JUANITO','BSIT');

c. INSERT INTO STUDENTS (1,'DELA CRUZ','JUANITO','BSIT');

d. INSERT INTO STUDENTSVALUES('1','DELA CRUZ','JUANITO','BSIT');

Check

Feedback
Which of the following is the correct example of updating the COURSE to ‘N/A’ of all students
from STUDENTS table whose course IS NULL;
Select one:

a. UPDATE TABLE STUDENTS

SET COURSE = ‘N/A’


WHERE COURSE IS NULL;

b. UPDATE STUDENTS

SET COURSE = ‘N/A’


WHERE COURSE IS NULL;

c. UPDATE STUDENTS

SET COURSE = ‘N/A’


WHERE COURSE = NULL;

d. UPDATE TABLE STUDENTS

SET COURSE = ‘N/A’


WHERE COURSE = NULL;

Check

Feedback
Which of the following is the correct example updating the student LASTNAME TO ‘SANTOS’
and course to ‘BSCS’ whose STUD_ID is equal to 109?
Select one:
a. UPDATE EMPLOYEES

SET LASTNAME = ‘SANTOS’, SET COURSE = ‘BSCS’


WHERE STUD_ID = 109;

b. UPDATE TABLE EMPLOYEES

SET LASTNAME = ‘SANTOS’, SET COURSE = ‘BSCS’


WHERE STUD_ID = 109;

c. UPDATE TABLE EMPLOYEES

SET LASTNAME = ‘SANTOS’, COURSE = ‘BSCS’


WHERE STUD_ID = 109;

d. UPDATE EMPLOYEES

SET LASTNAME = ‘SANTOS’, COURSE = ‘BSCS’


WHERE STUD_ID = 109;

Check

Feedback
Which of the following is the correct example inserting a new value to STUDENTS table that will
only add new data to STUD_ID and LASTNAME? The stud_id is 10 and lastname is 'CRUZ' and
the rest of the column is set to NULL.
Select one:

a. INSERT INTO STUDENTS TABLE VALUES (10,'CRUZ','NULL','NULL');

b. INSERT INTO STUDENTS VALUES (10,'CRUZ',NULL,NULL);

c. INSERT INTO STUDENTS (10,'CRUZ',NULL,NULL);

d. INSERT INTO STUDENTS VALUES (10,'CRUZ','NULL','NULL');

Check

Feedback
Which of the following is the correct example updating all student COURSE to ‘BSIT’ from
STUDENTS table?
Select one:
a. UPDATE STUDENTS

SET COURSE = ‘BSIT’;

b. UPDATE TABLE STUDENTS

SET COURSE = ‘BSIT’


WHERE COURSE = ‘BSIT’;

c. UPDATE STUDENTS

SET COURSE = ‘BSIT’


WHERE COURSE = ‘BSIT’;

d. UPDATE TABLE STUDENTS

SET COURSE = ‘BSIT’;

Check

Choose the letter of the correct answer based on the given table PARTS as shown below.
Which of the following SELECT statement is the correct PL/SQL that will display all rows and
columns?

SELECT * FROM PARTS;

SELECT ALL FROM PARTS;

SELECT TABLE PARTS;

SELECT FROM TABLE PARTS;


Which of the following SELECT statement is the correct PL/SQL that will displayeliminate the
duplicate rows for column class and warehouse.

SELECT DISTINCT CLASS, WAREHOUSE FROM PARTS;

SELECT DISTINCT CLASS AND WAREHOUSE FROM PARTS;

SELECT DISTINCT CLASS, DISTINCT WAREHOUSE FROM PARTS;

SELECT DISTINCT CLASS AND DISTINCT WAREHOUSE FROM PARTS;


Which of the following SELECT statement is the correct PL/SQL that willcreate a report
specifying only the column PRICE, ONHAND and DESCRIPTION?

SELECT PRICE, ONHAND, DESCRIPTION FROM PARTS;

SELECTONHAND,PRICE ,DESCRIPTION FROM PARTS;

SELECT (ONHAND||PRICE ||DESCRIPTION FROM PARTS;

SELECTONHAND,PRICE DESCRIPTION FROM PARTS ORDER BY ONHAND;


Which of the following SELECT statement is the correct PL/SQL that willcreate a report that will
add 10% increase in PRICE? List only the column DESCRIPTION, CLASS and PRICE.

SELECT (PRICE*0.10)+PRICE, DESCRIPTION, CLASS FROM PARTS;

SELECT PRICE*10, DESCRIPTION, CLASS FROM PARTS;

SELECT PRICE*0.10 FROM PARTS;

SELECT PRICE*10+PRICE, DESCRIPTION, CLASS FROM PARTS;


Which of the following SELECT statement is the correct report that will deduct 5 from ONHAND,
multiply 5 in WAREHOUSE, after getting the value on both ONHAND and WAREHOUSE add
their data: as shown below:
ONHAND - 5 + 5 * WAREHOUSE
Note that you have to force the Oracle to prioritize first the Subtraction over Multiplication. List
only the column DESCRIPTION, ONHAND and WAREHOUSE.

SELECT (ONHAND-5) + 5 * WAREHOUSE, DESCRIPTION FROM PARTS;

SELECT ONHAND-5 + 5 * WAREHOUSE, DESCRIPTION FROM PARTS;

SELECT ONHAND-5 + 5 (* WAREHOUSE), DESCRIPTION FROM PARTS;

SELECT (ONHAND-5) + 5(* WAREHOUSE), DESCRIPTION FROM PARTS;

Check

Feedback
Choose the letter of the correct answer based on the given table PARTS as shown below.

Which of the following SELECT statement is the correctreport that will rename the column
DESCRIPTION to TITLE, PARTNUM to ID and ONHAND to STOCK?

SELECT DESCRIPTION AS TITLE, PARTNUM AS ID, ONHAND AS STOCK FROM PART;

SELECT DESCRIPTION AS ‘TITLE’, PARTNUM AS ‘ID’, ONHAND AS ‘STOCK’ FROM


PARTS;
SELECT DESCRIPTION RENAME AS TITLE, PARTNUM RENAME AS ID, ONHAND
RENAME AS STOCK FROM PARTS;

SELECT DESCRIPTION NEW AS TITLE, PARTNUM NEW AS ID, ONHAND NEW AS


STOCK FROM PARTS;
Which of the following SELECT statement is the correctreport the will merge the column CLASS
and PRICE rename the COLUMN as “CLASS PRICE”.

SELECT (CLASS||PRICE) AS “CLASS PRICE” FROM PARTS;

SELECT (CLASS||PRICE) AS CLASS PRICE FROM PARTS;

SELECT (CLASS||PRICE) CLASS PRICE FROM PARTS;

SELECT (‘CLASS’||’PRICE’) AS “CLASS PRICE” FROM PARTS;


Which of the following SELECT statement is the correctreport that will combine the column
PARTNUM and DESCRIPTION put a literal character string “belongs to” in between the two
columns then rename the column as “NUMBER TITLE”. Note put space before and after the
character literal string to avoid no spaces in the report.

SELECT (PARTNUM||’ THAT BELONGS TO ’||DESCRIPTION) AS “NUMBER


TITLE” FROM PARTS;

SELECT (PARTNUM||’ THAT BELONGS TO ’||DESCRIPTION) AS NUMBER TITLE FROM


PARTS;

SELECT (PARTNUM|| THAT BELONGS TO ||DESCRIPTION) AS “NUMBER


TITLE” FROM PARTS;

SELECT (;PARTNUM’||’ THAT BELONGS TO ’||’DESCRIPTION;) AS “NUMBER


TITLE” FROM PARTS;
Which of the following SELECT statement is the correctreport that will display the unique value
for WAREHOUSE renames the column as “No. of Available Warehouse”.

SELECT DISTINCT WAREHOUSE AS “No. of available warehouse” FROM PARTS;

SELECT DISTINCT ‘WAREHOUSE AS’ “No. of available warehouse” FROM PARTS;

SELECT DISTINCT WAREHOUSE AS No. of available warehouse FROM PARTS;

SELECT DISTINCT COLUMN WAREHOUSE AS “No. of available warehouse” FROM


PARTS;
Which of the following is the correct report that will display the CLASS from table PARTS.
SELECT CLASS FROM PARTS;

SELECT * CLASS FROM PARTS;

SELECT ‘CLASS’ FROM PARTS;

SELECT CLASS AS CLASS FROM PARTS;

Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report listing only the column DESCRIPTION, PARTNUM,
CLASS and PRICE of all parts where the description fourth letter starting from the first is equal
to ‘D’.

SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS WHERE


DESCRIPTION LIKE ‘___D%’;

SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS WHERE


DESCRIPTION LIKE ‘%D___’;

SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS WHERE


DESCRIPTION LIKE ‘D%’;

SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS WHERE


DESCRIPTION LIKE ‘%D’;
Feedback
Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report that will display the distinct value for CLASS and
WAREHOUSE limit the rows by getting only the parts under WAREHOUSE 3?

SELECT CLASS, WAREHOUSE FROM PARTS WHERE WAREHOUSE = 3;

SELECT CLASS, WAREHOUSE FROM PARTS WHERE WAREHOUSE = ‘3’;

SELECT CLASS, WAREHOUSE FROM PARTS WHERE WAREHOUSE = =3;


SELECT CLASS, WAREHOUSE =3 FROM PARTS WHERE WAREHOUSE = 3;
Feedback
Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report listing only the column DESCRIPTION,
WAREHOUSE, CLASS and PRICE of all parts where the description contains keyword ‘SHE’.

SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS WHERE


DESCRIPTION LIKE ‘%SHE%’;

SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS WHERE


DESCRIPTION LIKE ‘SHE%’;

SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS WHERE


DESCRIPTION LIKE ‘%SHE’;

SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS WHERE


DESCRIPTION LIKE ‘SHE’;
Feedback
Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report listing only the column PARTNUM, CLASS and
ONHAND of all parts where partnum is equal to AT94, DR93 and KV29. (Note 1 query only and
do not use logical condition)

SELECT PARTNUM, CLASS, ONHAND FROM PARTS WHERE PARTNUM IN


(‘AT94’,’DR93’,’KV29’);

SELECT PARTNUM, CLASS, ONHAND FROM PARTS WHERE PARTNUM IN


(AT94,DR93,KV29);

SELECT PARTNUM, CLASS, ONHAND FROM PARTS WHERE PARTNUM =


(‘AT94’,’DR93’,’KV29’);

SELECT PARTNUM, CLASS, ONHAND FROM PARTS WHERE PARTNUM NOT IN


(‘AT94’,’DR93’,’KV29’);
Feedback
Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report that will merge the column DESCRIPTION and
PRICE put a literal character string of = “ with a price of ” in between the two columns. Limit the
rows returned by getting only the partnum that starts with letter ‘K’.

SELECT (DESCRIPTION|| ‘WITH A PRICE OF’ || PRICE) FROM PARTS WHERE


PARTNUM LIKE ‘K%’;

SELECT (DESCRIPTION|| ‘WITH A PRICE OF’ || PRICE) FROM PARTS WHERE


PARTNUM LIKE ‘%K’;

SELECT (DESCRIPTION|| ‘WITH A PRICE OF’ || PRICE) FROM PARTS WHERE


PARTNUM LIKE ‘%K%’;

SELECT (DESCRIPTION|| ‘WITH A PRICE OF’ || PRICE) FROM PARTS WHERE


PARTNUM LIKE ‘__K%’;
Feedback
Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report listing the column PARTNO, DESCRIPTION and
WAREHOUSE. Get only that description that does not ends with ‘ER’. Note that you have to
merge the said three columns, rename the merge column as “Parts Record”. Below is the
sample output for column.
Parts Record
AT94is the part number ofIRONwhich belong to warehouse3

SELECT (PARTNUM || ‘is the part number of’|| DESCRIPTION || ‘which belongs to’ ||
WAREHOUSE FROM PARTS WHERE PARTNUM NOT LIKE ‘%ER’;

SELECT (PARTNUM || ‘is the part number of’ ||DESCRIPTION || ‘which belongs to’ ||
WAREHOUSE) FROM PARTS WHERE PARTNUM NOT LIKE ‘ER%’;

SELECT (PARTNUM ‘is the part number of’ DESCRIPTION‘which belongs


to’WAREHOUSE) FROM PARTS WHERE PARTNUM NOT LIKE ‘%ER’;

SELECT (PARTNUM || ‘is the part number of’ ||DESCRIPTION || ‘which belongs to’ ||
WAREHOUSE) FROM PARTS WHERE PARTNUM LIKE ‘%ER’;
Feedback
Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report listing only the column CLASS, DESCRIPTION and
PRICE of all PARTS where price range is between 200 to 500.

SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE PRICE BETWEEN 200
AND 500;

SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE PRICE BETWEEN 500
AND 500;

SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE PRICE BETWEEN =200
AND 500;

SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE PRICE BETWEEN 200
AND BETWEEN 500;
Feedback
Choose the letter of the correct answer based on table PARTS as shown below

Which of the following is the correct report listing only the column PARTNUM, DESCRIPTION
and PRICE of all PARTS where price is less than 500. Sort the PRICE in ascending order.

SELECT PARTNUN, DESCRIPTION, PRICE FROM PARTS WHERE PRICE < 500;

SELECT PARTNUN, DESCRIPTION, PRICE FROM PARTS WHERE PRICE > 500;

SELECT PARTNUN, DESCRIPTION, PRICE FROM PARTS WHERE PRICE <=500;

SELECT PARTNUN, DESCRIPTION, PRICE FROM PARTS WHERE PRICE >= 500;
Feedback
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report that will display the DESCRIPTION, WAREHOUSE
AND distinct value for CLASS.

SELECT DISTINCT (CLASS),DESCRIPTION, WAREHOUSE FROM PARTS;

SELECT DESCRIPTION, WAREHOUSE, CLASS FROM PARTS;

SELECT DISTINCT DESCRIPTION, WAREHOUSE, CLASS FROM PARTS;

SELECT DESCRIPTION, WAREHOUSE, DISTINCT ‘CLASS ‘ FROM PARTS;

Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:

a. SELECT DESCRIPTION, ONHAND,CLASS

FROM PARTS
WHERE CLASS = ‘HW’;

b. SELECT DESCRIPTION, ONHAND,CLASS

FROM PARTS
WHERE CLASS = HW;

c. SELECT DESCRIPTION, ONHAND,CLASS

FROM PARTS
WHERE ONHAND >=21;

d. SELECT DESCRIPTION, ONHAND,CLASS

FROM PARTS
WHERE ONHAND IN(50,21,22);
Feedback
Correct

Marks for this submission: 1.00/1.00.

Question 2
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Given the output below. Which of the following is the correct PL/SQL to be used?

Select one:

a. SELECT * FROM PARTS;

b. SELECT ALL FROM PARTS;

c. SELECT ALL COLUMN FROM PARTS;

d. SELECT * FROM TABLE PARTS;

Feedback
Correct

Marks for this submission: 1.00/1.00.

Question 3
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Given the output below. Which of the following is the correct PL/SQL to be used?

Select one:

a. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS IN (‘HW’,’SG’);
b. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE DESCRIPTION LIKE ‘%L’;

c. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE ONHAND >=9;

d. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE DESCRIPTION LIKE ‘L%’;
Feedback
Correct

Marks for this submission: 1.00/1.00.

Question 4
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Given the output below. Which of the following is the correct PL/SQL to be used

Select one:

a. SELECT WAREHOUSE, CLASS FROM PARTS WHERE CLASS IN (‘AP’,’SG’,’HW’);

b. SELECT WAREHOUSE, CLASS FROM PARTS;

c. SELECT DISTINCT WAREHOUSE FROM PARTS;

d. SELECT DICTINCT WAREHOUSE, CLASS FROM PARTS WHERE WAREHOUSE >=1;

Feedback
Correct
Marks for this submission: 1.00/1.00.

Question 5
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Given the output below. Which of the following is the correct PL/SQL to be used?

Select one:

a. SELECT DESCRIPTION, PRICE *.5 +PRICE-100 FROM PARTS WHERE PRICE >10000;

b. SELECT DESCRIPTION, (PRICE *.5 )+PRICE-100 FROM PARTS WHERE PRICE >10000;

c. SELECT DESCRIPTION, PRICE *.5 +PRICE-100 FROM PARTS WHERE PRICE <10000;

d. SELECT DESCRIPTION, PRICE *.5 +(PRICE-100) FROM PARTS WHERE PRICE <10000;

Feedback
Correct

Marks for this submission: 1.00/1.00.

Question 6
Correct

Mark 0.67 out of 1.00

Flag question

Question text
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:

a. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS = ‘AP’ OR ONHAND BETWEEN 8 AND 12;

b. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS = ‘AP’ AND ONHAND BETWEEN 8 AND 12;

c. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS = ‘AP’ OR DESCRIPTION LIKE ‘%ER’;

d. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS = ‘AP’ AND DESCRIPTION LIKE ‘%ER’;
Feedback
Correct

Marks for this submission: 1.00/1.00. Accounting for previous tries, this gives 0.67/1.00.

Question 7
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Given the output below. Which of the following is the correct PL/SQL to be used?

Select one:

a. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS = ‘AP’ OR ONHAND BETWEEEN 8 AND 12

b. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS = ‘AP’ AND DESCRIPTION LIKE ‘__S%’;

c. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS = ‘AP’ OR ONHAND >=8;

d. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS = ‘AP’ OR DESCRIPTION LIKE ‘__S%’;
Feedback
Correct

Marks for this submission: 1.00/1.00.

Question 8
Correct

Mark 0.67 out of 1.00

Flag question

Question text
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:

a. SELECT WAREHOUSE, CLASS FROM PARTS;

b. SELECT DISTINCT WAREHOUSE, CLASS FROM PARTS;

c. SELECT WAREHOUSE, CLASS FROM PARTS WHERE CLASS IN (‘AP’,’SG’,’HW’);

d. SELECT DISTINCT WAREHOUSE, CLASS FROM PARTS WHERE WAREHOUSE >=1;

Feedback
Correct

Marks for this submission: 1.00/1.00. Accounting for previous tries, this gives 0.67/1.00.

Question 9
Correct

Mark 1.00 out of 1.00


Flag question

Question text
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:

a. SELECT (PARTNUM|| ‘belong to’||DESCRIPTION) FROM PARTS WHERE PARTNUM IN


(‘BV06,’KV29’)

b. SELECT (PARTNUM|| belong to||DESCRIPTION) FROM PARTS WHERE CLASS = ‘SG’;

c. SELECT (PARTNUM|| ‘belong to’||DESCRIPTION) FROM PARTS WHERE CLASS = ‘SG’;

d. SELECT (PARTNUM|| ‘belong to’||DESCRIPTION) FROM PARTS WHERE CLASS = SG;

Feedback
Correct

Marks for this submission: 1.00/1.00.

Question 10
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:

a. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE DESCRIPTION LIKE ‘%R’;

b. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS IN (‘HW’,’AP’);

c. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE DESCRIPTION LIKE ‘R%’;

d. SELECT DESCRIPTION, ONHAND, CLASS

FROM PARTS
WHERE CLASS = ‘AP’ OR CLASS = ‘HW’;
Feedback
Correct

Marks for this submission: 1.00/1.00.

Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT TRIM(‘K’ FROM LASTNAME)AS TRIM, LASTNAME, DEPARTMENT_ID,
MANAGER_ID
FROM EMPLOYEES
WHERE DEPARTMENT_ID = 50
AND MANAGER_ID = 100;
Select one:

a. RAJS RAJS 50 124

b. MOURGOS MOURGOS 50 100

c. ZLOTKEY ZLOTKEY 80 100

d. MOURGOS ZLOTKEY 80 100


Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT TRUNC(563.396,-2) FROM DUAL;
Select one:
a. 563

b. 500

c. 563.39

d. 563.3
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT INITCAP(LASTNAME||’,’||FIRSTNAME) AS NAME
FROM EMPLOYEES
WHERE JOB_ID LIKE ’%PR%’;
Select one:

a. KING,STEVEN

HUNOLD,ALEXANDER
ERNST,BRUCE
LORENTZ,DIANA

b. King,Steven

Hunold,Alexander
Ernst,Bruce
Lorentz,Diana

c. king,steven

hunold,alexander
ernst,bruce
lorentz,Diana

d. King’,’Steven

Hunold’,’Alexander
Ernst’,’Bruce
Lorentz’,’Diana
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT (LASTNAME||FIRSTNAME), JOB_ID
FROM EMPLOYEES
WHERE SUBSTR (JOB_ID,4)=’REP’;
Select one:

a. ABELELLEN SA_REP
TALORJONATHAN SA_REP
GRANTKIMBERLY SA_REP
FAYPAT MK_REP

b. ABELELLEN SA_REP
TALORJONATHAN SA_REP
GRANTKIMBERLY SA_REP

c. ABELELLEN SA_REP
GRANTKIMBERLY SA_REP
FAYPAT MK_REP

d. TALORJONATHAN SA_REP
GRANTKIMBERLY SA_REP
FAYPAT MK_REP
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT LASTNAME,SALARY, RPAD(SALARY,4,’@’)
FROM EMPLOYEES
WHERE SALARY BETWEEN 4000 AND 9000
LASTNAME LIKE ‘%S’;
Select one:

a.

DAVIES 3100 3100


MATOS 2600 2600
VARGAS 2500 2500
HIGGINS 12000 12000

b. MOURGOS 5800 5800

c. MOURGOS 5800 5800@@@@

RAJS 3500 3500@@@@


DAVIES 3100 3100@@@@
MATOS 2600 2600@@@@
VARGAS 2500 2500@@@@
HIGGINS 12000 12000@@@

d. MOURGOS 5800 @@@@5800


Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT LOWER(LASTNAME||’with a salary of’||SALARY) as Record, LENGTH(LASTNAME)
as Lname
FROM EMPLOYEES
WHERE MANAGER_ID IS NULL
OR SALARY IS NULL;
Select one:

a. king with a salary of 24000 4


hunold with a salary of 2400 6

b. kingwith a salary of 24000 4


hunoldwith a salary of 2400 6

c. KINGWITH A SALARY OF 24000 4


HUNOLDWITH A SALARY OF 2400 6

d. KING WITH A SALARY OF 24000 4


HUNOLD WITH A SALARY OF 2400 6
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT TRUNC(563.396,2)FROM DUAL;
Select one:

a. 563.3

b. 563

c. 563.39

d. 500
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT MOD(SALARY,10) AS “EXCESS SALARY”
FROM EMPLOYEES
WHERE SALARY < 5000;
Select one:

a. 3

3
3
3
3

b. 0

0
0
0
0

c. 3

3
3
3
3
3

d. 0

0
0
0
0
0
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT FIRSTNAME, SALARY, LPAD(SALARY * 0.10 + SALARY – 100, 8, ‘$’) AS BONUS
FROM EMPLOYEES
WHERE DEPARTMENT_ID NOT IN (10, 110, 50
AND SALARY=17000;
Select one:

a. NENA 17000 $$$18600

LEX 17000 $$$18600

b. NENA 17000 $$$17000

LEX 17000 $$$17000

c. NENA 17000 17000$$$

LEX 17000 17000$$$

d. NENA 17000 18600$$$

LEX 17000 18600$$$


Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT TRUNC(563.396,1)FROM DUAL;
Select one:

a. 563.39

b. 563.3

c. 563

d. 500

Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
What query should be used in order todisplay the firstname and length of firstname rename the
column length of firstname as Number of Character of all employees whose salary is between
4400 and 8300
Select one:

a. SELECT FIRSTNAME, LENGTH(FIRSTNAME) AS NUMBER OF CHARACTER

FROM EMPLOYEES
WHERE SALARY BETWEEN 4400 AND 8300;

b. SELECT FIRSTNAME, LENGTH(FIRSTNAME) AS "NUMBER OF CHARACTER"

FROM EMPLOYEES
WHERE SALARY BETWEEN 8300 AND 4400;

c. SELECT FIRSTNAME, LENGTH(FIRSTNAME) AS "NUMBER OF CHARACTER"

FROM EMPLOYEES
WHERE SALARY BETWEEN 4400 AND 8300;

d. SELECT FIRSTNAME, INSTR(FIRSTNAME) AS "NUMBER OF CHARACTER"

FROM EMPLOYEES
WHERE SALARY BETWEEN 4400 AND 8300;
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
What query should be used in order todisplay a report that trim the letter ‘A’ from lastname of all
employees whose department_id between 60 and 90.
Select one:

a. SELECT TRIM('A' FROM LASTNAME)

FROM EMPLOYEES
WHERE DEPARTMENT_ID BETWEEN 60 AND 90;

b. SELECT TRIM(LASTNAME,’A’)

FROM EMPLOYEES
WHERE DEPARTMENT_ID BETWEEN 60 AND 90;

c. SELECT TRIM('A' FROM LASTNAME)

FROM EMPLOYEES
WHERE DEPARTMENT_ID BETWEEN 90 AND 60;

d. SELECT TRIM('A' FROM LASTNAME)

FROM EMPLOYEES
WHERE DEPARTMENT_ID BETWEEN 60 OR 90;
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
What query should be used in order to display the employees lastname concatenated to salary.
Format the salary column to 6 character long right padded with ‘*’ as special character for all
employees whose manager_id is null or salary between 4000 and 6000 Rename the column as
employees and their Salaries
Select one:

a. SELECT (FIRSTNAME||RPAD(SALARY,6,'*')) AS "EMPLOYEES AND THEIR SALARIES"

FROM EMPLOYEES
WHERE MANAGER_ID = NULL
OR SALARY BETWEEN 4000 AND 6000;
b. SELECT (FIRSTNAME||RPAD(SALARY,6,'*')) AS "EMPLOYEES AND THEIR SALARIES"

FROM EMPLOYEES
WHERE MANAGER_ID IS NULL
OR SALARY BETWEEN 4000 OR 6000;

c. SELECT (FIRSTNAME||RPAD(SALARY,6,'*')) AS "EMPLOYEES AND THEIR SALARIES"

FROM EMPLOYEES
WHERE MANAGER_ID IS NULL
OR SALARY BETWEEN 4000 AND 6000;

d. SELECT (FIRSTNAME||(SALARY,6,'*')) AS "EMPLOYEES AND THEIR SALARIES"

FROM EMPLOYEES
WHERE MANAGER_ID IS NULL
OR SALARY BETWEEN 4000 AND 6000;
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
What query should be used in order to display the firstname concatenated to salary with
additional column salary that provides a computation of salary * 2. Rename the column as
Increase of all employees whose lastname ends with N.
Select one:

a. SELECT (FIRSTNAME || 'SALARY OF' || SALARY || 'IF MULITPLY BY TWO THEN HE/SHE
WLL GOT A NEW SALARY OF' || SALARY * 2)AS INCREASE FROM EMPLOYEES WHERE
LASTNAME LIKE 'N%';

b. SELECT (FIRSTNAME || 'SALARY OF' SALARY 'IF MULITPLY BY TWO THEN HE/SHE
WLL GOT A NEW SALARY OF' || SALARY * 2)AS INCREASE FROM EMPLOYEES WHERE
LASTNAME LIKE 'N%';

c. SELECT (FIRSTNAME || 'SALARY OF' || SALARY || 'IF MULITPLY BY TWO THEN HE/SHE
WLL GOT A NEW SALARY OF' || SALARY * 2)AS INCREASE FROM EMPLOYEES WHERE
LASTNAME LIKE '%N';

d. SELECT lower(FIRSTNAME || 'SALARY OF' || SALARY || 'IF MULITPLY BY TWO THEN


HE/SHE WLL GOT A NEW SALARY OF' || SALARY * 2)AS INCREASE FROM
EMPLOYEES WHERE LASTNAME LIKE 'N%';
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
What query should be used in order to display the salary leftpadded with 15 character long and
‘$’ as special character and another column salary right padded with 10 character long with ‘@’
as special character used of all employees in 201, 176 and 144.
Select one:

a. SELECT LPAD(SALARY,15,'$'), RPAD(SALARY,10,'@')

FROM EMPLOYEES
WHERE EMPLOYEE_ID = (201,176,144);

b. SELECT RPAD(SALARY,15,'$'), LPAD(SALARY,10,'@')

FROM EMPLOYEES
WHERE EMPLOYEE_ID IN (201,176,144);

c. SELECT LPAD(SALARY,15,'$'), RPAD(SALARY,10,'@')

FROM EMPLOYEES
WHERE EMPLOYEE_ID IN (201,176,144);

d. SELECT LPAD(SALARY,15,'@'), RPAD(SALARY,10,'$')

FROM EMPLOYEES
WHERE EMPLOYEE_ID IN (201,176,144);
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
What query should be used in order to display the employees lastname concatenated with
firstname and with a ‘, (comma)’ in between. A rename on the concatenated column as
Complete Name. Note all values in Complete Name column should be in lowercase plus display
the length of employees lastname for all employees whose lastname starts with letter M sort the
lastname in its default order.
Select one:

a. SELECT LOWER(LASTNAME||','||FIRSTNAME) AS "COMPLETE NAME",

LENGTH(LASTNAME)
FROM EMPLOYEES
WHERE LASTNAME LIKE 'M%';

b. SELECT LOWER(LASTNAME||','||FIRSTNAME) AS COMPLETE NAME,

LENGTH(LASTNAME)
FROM EMPLOYEES
WHERE LASTNAME LIKE '%M';

c. SELECT LOWER(LASTNAME||','||FIRSTNAME) AS COMPLETE NAME,

LENGTH(LASTNAME)
FROM EMPLOYEES
WHERE LASTNAME LIKE 'M%';

d. SELECT LOWER(LASTNAME,FIRSTNAME) AS COMPLETE NAME,

LENGTH(LASTNAME)
FROM EMPLOYEES
WHERE LASTNAME LIKE 'M%';
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
What query should be used in order to display the lastname and salary of all employees whose
department_id = 60 or job_id like ‘_T%’. Format the salary to be 15 character long, left padded
with ‘$’ as special character. Label the column Salary.
Select one:

a. SELECT LASTNAME, RPAD(SALARY,15,'$') AS SALARY

FROM EMPLOYEES
WHERE DEPARTMENT_ID = 60 OR JOB_ID LIKE '_T';

b. SELECT LASTNAME, LPAD(SALARY,15,'$') AS SALARY

FROM EMPLOYEES
WHERE DEPARTMENT_ID = 60 OR JOB_ID LIKE '_T';

c. SELECT LASTNAME, LPAD(SALARY,15,'$')


FROM EMPLOYEES
WHERE DEPARTMENT_ID = 60 OR JOB_ID LIKE '_T';

d. SELECT LASTNAME, LPAD(SALARY,15,'$') AS SALARY

FROM EMPLOYEES
WHERE DEPARTMENT_ID = 60 AND JOB_ID LIKE 'T';
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
What query should be used in order todisplay the firstname in capitalized format rename the
column as pangalan whose job_id is equal to ‘SA_REP’.
Select one:

a. SELECT UPPER(FIRSTNAME) PANGALAN

FROM EMPLOYEES
WHERE JOB_ID = 'SA_REP';

b. SELECT FIRSTNAME AS PANGALAN

FROM EMPLOYEES
WHERE JOB_ID = 'SA_REP';

c. SELECT UPPER(FIRSTNAME) AS PANGALAN

FROM EMPLOYEES
WHERE JOB_ID IS 'SA_REP';

d. SELECT UPPER(FIRSTNAME) AS PANGALAN

FROM EMPLOYEES
WHERE JOB_ID = 'SA_REP';
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
What query should be used in order toget theSUBSTR function that returns the job_id = ‘REP’.
Select one:
a. SELECT JOB_ID FROM EMPLOYEES

WHERE JOB_ID LIKE ‘%REP%’;

b. SELECT JOB_ID FROM EMPLOYEES

WHERE SUBSTR(JOB_ID,4)='%REP%';

c. SELECT JOB_ID FROM EMPLOYEES

WHERE SUBSTR(JOB_ID,4)='REP';

d. SELECT JOB_ID FROM EMPLOYEES

WHERE SUBSTR='REP';
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
What query should be used in order todisplay the Firstname concatenated to employees original
salary plus concatenate again a new column salary that multiplies the original salary into three.
Rename the column as Dream Salaries.Note sort the salary in descending order.
Select one:

a. SELECT (FIRSTNAME||' EARNS '|| SALARY || 'MONTHLY BUT WANTS' || SALARY * 3)

AS "DREAM SALARIES"
FROM EMPLOYEES
ORDER BY SALARY;

b. SELECT (FIRSTNAME||' EARNS MONTHLY BUT WANTS' || SALARY * 3)

AS "DREAM SALARIES"
FROM EMPLOYEES
ORDER BY SALARY DESC;

c. SELECT (FIRSTNAME||' EARNS '|| SALARY || 'MONTHLY BUT WANTS' || SALARY * 3)

AS "DREAM SALARIES"
FROM EMPLOYEES
ORDER BY SALARY DESC;

d. SELECT (FIRSTNAME||' EARNS MONTHLY BUT WANTS' || SALARY * 3)

AS "DREAM SALARIES"
FROM EMPLOYEES
ORDER BY SALARY;

Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Which of the following is the correct query that displays the minimum lastname?
Select one:

a. SELECT MIN LASTNAME FROM EMPLOYEES;

b. SELECT MIN(LASTNAME) FROM EMPLOYEES;

c. SELECT COUNT (MIN(LASTNAME)) FROM EMPLOYEES;

d. SELECT COUNT (DISCTINCT MIN(LASTNAME)) FROM EMPLOYEES;


Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Which of the following is the correct query that counts the number of ST_CLERK job_id?
Rename the column as “Total no. of ST_CLERK”.
Select one:

a. SELECT COUNT(JOB_ID), AS TOTAL NO. OF ST_CLERK

FROM EMPLOYEES
WHERE JOB_ID = ‘ST_CLERK’;

b. SELECT COUNT(JOB_ID), AS “TOTAL NO. OF ST_CLERK”

FROM EMPLOYEES
WHERE JOB_ID != ‘ST_CLERK’;

c. SELECT COUNT * (JOB_ID), AS “TOTAL NO. OF ST_CLERK”


FROM EMPLOYEES
WHERE JOB_ID = ‘ST_CLERK’;

d. SELECT COUNT(JOB_ID), AS “TOTAL NO. OF ST_CLERK”

FROM EMPLOYEES
WHERE JOB_ID = ‘ST_CLERK’;
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Which of the following is the correct query that displays the MINIMUM salary of employees per
job_id? Note job_id should be in lowercase.
Select one:

a. SELECT MIN(SALARY) AS LOWEST SALARY, LOWER(JOB_ID)

FROM EMPLOYEES;

b. SELECT MIN(SALARY) AS “LOWEST SALARY”, LOWER(JOB_ID)

FROM EMPLOYEES
GROUP BY JOB_ID;

c. SELECT MIN(SALARY) AS “LOWEST SALARY”, LOWER(JOB_ID)

FROM EMPLOYEES;

d. SELECT MIN(SALARY) AS LOWEST SALARY, LOWER(JOB_ID)

FROM EMPLOYEES
GROUP BY JOB_ID;
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Which of the following is the correct query that display the Job_id and add the ff: function:
• Count the total number of job_id per distinct values; Compute for the summary of
salary per job_id; and Compute for the average salary per job_id
Select one:
a. SELECT DISTINCT(JOB_ID), COUNT(JOB_ID) AS “NO. OF JOB_ID”, SUM(SALARY) AS
“TOTAL SALARY”, AVG(SALARY) AS “AVERAGE SALARY” FROM EMPLOYEES GROUP BY
JOB_ID;

b. SELECT COUNT (DISTINCT(JOB_ID) AS “NO. OF JOB_ID”, SUM(SALARY) AS “TOTAL


SALARY”, AVG(SALARY) AS “AVERAGE SALARY” FROM EMPLOYEES GROUP BY JOB_ID;

c. SELECT DISTINCT(JOB_ID), COUNT(JOB_ID) AS “NO. OF JOB_ID”, SUM(SALARY) AS


“TOTAL SALARY”, AVG(SALARY) AS “AVERAGE SALARY” FROM EMPLOYEES;

d. SELECT DISTINCT(JOB_ID), COUNT * (JOB_ID) AS “NO. OF JOB_ID”, SUM(SALARY) AS


“TOTAL SALARY”, AVG(SALARY) AS “AVERAGE SALARY” FROM EMPLOYEES GROUP BY
JOB_ID;
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Which of the following is the correct query that displays the maximum salary?
Select one:

a. SELECT MAX SALARY FROM EMPLOYEES;

b. SELECT COUNT (MAX(SALARY)) FROM EMPLOYEES;

c. SELECT MAX(SALARY) FROM EMPLOYEES;

d. SELECT COUNT (DISCTINCT MAX(SALARY)) FROM EMPLOYEES;


Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Which of the following is the correct that display distinct job_id and the the total number per
distinct (unique) job_id.
Select one:

a. SELECT DISTICT(JOB_ID), COUNT*(JOB_ID) AS “TOTAL NUMBER OF JOB_ID”

FROM EMPLOYEES
GROUP BY JOB_ID;

b. SELECT DISTICT(JOB_ID), COUNT(JOB_ID) AS “TOTAL NUMBER OF JOB_ID”

FROM EMPLOYEES;
c. SELECT DISTICT(JOB_ID), COUNT(JOB_ID) AS “TOTAL NUMBER OF JOB_ID”

FROM EMPLOYEES
GROUP BY JOB_ID;

d. SELECT DISTICT((JOB_ID), COUNT(JOB_ID)) AS “TOTAL NUMBER OF JOB_ID”

FROM EMPLOYEES
GROUP BY JOB_ID;
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Which of the following is the correct query that displays the lowest salary rename as “LOWEST
SALARY”, maximum salary rename as “HIGHEST SALARY” and department_id concatenated
to job_id?
Select one:

a. SELECT CONCAT(DEPARTMENT_ID,JOB_ID),MIN(SALARY), MAX(SALARY)

FROM EMPLOYEES
GROUP BY DEPARTMENT_ID;

b. SELECT CONCAT(DEPARTMENT_ID,JOB_ID),MIN(SALARY), MAX(SALARY)

FROM EMPLOYEES
GROUP BY JOB_ID;

c. SELECT CONCAT(DEPARTMENT_ID,JOB_ID),MIN(SALARY), MAX(SALARY)

FROM EMPLOYEES
GROUP BY JOB_ID,DEPARTMENT_ID;

d. SELECT CONCAT(DEPARTMENT_ID,JOB_ID),MIN(SALARY), MAX(SALARY)

FROM EMPLOYEES;
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Which of the following is the correct query that display the maximum lastname concatenated to
firstname and rename the column as “Employees Name”, Job_id and apply the ff. functions:
• Count the Job_id; Apply where condition whose lastname ends with letter ‘N’;
Group the job_id; and Apply having clause of employees having average salary that is
greater than 10000.
Select one:
a. SELECT MAX(LASTNAME||FIRSTNAME) AS "EMPLOYEES NAME", JOB_ID,
COUNT(JOB_ID)

FROM EMPLOYEES
WHERE LASTNAME LIKE '%N'
GROUP BY JOB_ID
HAVING AVG(SALARY)<10000;

b. SELECT MAX(LASTNAME||FIRSTNAME) AS "EMPLOYEES NAME", JOB_ID,


COUNT(JOB_ID)

FROM EMPLOYEES
WHERE LASTNAME LIKE '%N'
GROUP BY JOB_ID
HAVING AVG(SALARY)>10000;

c. SELECT MAX(LASTNAME||FIRSTNAME) AS EMPLOYEES NAME, JOB_ID,


COUNT(JOB_ID)

FROM EMPLOYEES
WHERE LASTNAME LIKE '%N'
GROUP BY JOB_ID
HAVING AVG(SALARY)>10000;

d. SELECT MAX(LASTNAME||FIRSTNAME) AS "EMPLOYEES NAME", JOB_ID,


COUNT(JOB_ID)

FROM EMPLOYEES
GROUP BY JOB_ID
WHERE LASTNAME LIKE '%N'
HAVING AVG(SALARY)>10000;
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Which of the following is the correct query that display the Minimum firstname concatenated to
lastname? Look for the maximum salary that is less than 10000 per department_id.
Select one:

a. SELECT MIN(FIRSTNAME,LASTNAME)

FROM EMPLOYEES
GROUP BY DEPARTMENT_ID
HAVING MAX(SALARY)<10000;

b. SELECT MIN(FIRSTNAME||LASTNAME)

FROM EMPLOYEES
GROUP BY DEPARTMENT_ID
HAVING MAX(SALARY)<10000;

c. SELECT MIN(FIRSTNAME||LASTNAME)

FROM EMPLOYEES
GROUP BY DEPARTMENT_ID
HAVING MAX(SALARY);

d. SELECT MIN(FIRSTNAME||LASTNAME)

FROM EMPLOYEES
HAVING MAX(SALARY)<10000
GROUP BY DEPARTMENT_ID;
Feedback
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Which of the following is the correct report that display the smallest (minimum) Surname.. and
apply the ff. functions:
• Get the average salary; Group the data per job_id; Get only job_id with a
keyword “REP”; and Apply having clause, which the max salary per job_id is greater
than 5000.
Select one:
a. SELECT CONCAT(DEPARTMENT_ID,JOB_ID),MIN(SALARY), MAX(SALARY)
FROM EMPLOYEES
GROUP BY JOB_ID;

b. SELECT MIN(LASTNAME), AVG(SALARY)

FROM EMPLOYEES
WHERE JOB_ID NOT LIKE ‘%REP%’
GROUP BY JOB_ID
HAVING MAX(SALARY)>500;

c. SELECT MIN(LASTNAME), AVG(SALARY)

FROM EMPLOYEES
GROUP BY JOB_ID
WHERE JOB_ID LIKE ‘%REP%’
HAVING MAX(SALARY)>500;

d. SELECT MIN(LASTNAME), AVG(SALARY)

FROM EMPLOYEES
WHERE JOB_ID LIKE ‘%REP%’
GROUP BY JOB_ID
HAVING MAX(SALARY)>500;

Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Question 1
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following query is correct which will display the same output as shown below?
Select one:
a. SELECT COUNT(DISTINCT MANAGER_ID) AS "NO. OF MANAGER_ID" FROM EMPLOYEES;

b. SELECT COUNT *(DISTINCT MANAGER_ID) AS "NO. OF MANAGER_ID" FROM


EMPLOYEES;

c. SELECT COUNT(DISTINCT MANAGER_ID) AS NO. OF MANAGER_ID FROM EMPLOYEES;

d. SELECT COUNT(MANAGER_ID) AS "NO. OF MANAGER_ID" FROM EMPLOYEES;

Feedbac
Question 2
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following query is correct which will display the same output as shown below?

Select one:

a. SELECT COUNT(*) FROM EMPLOYEES;

b. SELECT COUNT ALL FROM EMPLOYEES;

c. SELECT * FROM EMPLOYEES;

Feedbac
Question 3
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following query is correct which will display the same output as shown below?

Select one:
a. SELECT MIN(LASTNAME), JOB_ID, MAX(SALARY)

FROM EMPLOYEES
WHERE JOB_ID LIKE '%REP%';

b. SELECT MIN(LASTNAME), JOB_ID, MAX(SALARY)

FROM EMPLOYEES
WHERE JOB_ID LIKE 'REP%'
GROUP BY JOB_ID;

c. SELECT MIN(LASTNAME), MIN(JOB_ID), MAX(SALARY)

FROM EMPLOYEES
WHERE JOB_ID LIKE '%REP%'
GROUP BY JOB_ID;

d. SELECT MIN(LASTNAME), JOB_ID, MAX(SALARY)

FROM EMPLOYEES
WHERE JOB_ID LIKE '%REP%'
GROUP BY JOB_ID;
Feedbac
Question 4
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following query is correct which will display the same output as shown below?
Select one:

a. SELECT MAX(LASTNAME||','||FIRSTNAME) AS NAME, MAX(SALARY)

FROM EMPLOYEES;
b. SELECT MAX(LASTNAME||','||FIRSTNAME) AS NAME, MIN(SALARY)

FROM EMPLOYEES;

c. SELECT MAX(LASTNAME||FIRSTNAME) AS NAME, MAX(SALARY)

FROM EMPLOYEES;

d. SELECT MAX(LASTNAME||''||FIRSTNAME) AS NAME, MAX(SALARY)

FROM EMPLOYEES;
Feedback
Question 5
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following query is correct which will display the same output as shown below?
Select one:

a. SELECT MIN(LASTNAME||FIRSTNAME) AS NAME, DEPARTMENT_ID

FROM EMPLOYEES
GROUP BY DEPARTMENT_ID
WHERE DEPARTMENT_ID IN(90,50)
HAVING MIN(DEPARTMENT_ID)<=90;

b. SELECT MIN(LASTNAME||FIRSTNAME) AS NAME, DEPARTMENT_ID

FROM EMPLOYEES
WHERE DEPARTMENT_ID IN(90,50)
GROUP BY DEPARTMENT_ID
HAVING MIN(DEPARTMENT_ID)<=90;

c. SELECT MIN(LASTNAME||FIRSTNAME) AS NAME, DEPARTMENT_ID


FROM EMPLOYEES
WHERE DEPARTMENT_ID IN(90,50)
HAVING MIN(DEPARTMENT_ID)<=90;

d. SELECT MIN(LASTNAME||FIRSTNAME) AS NAME, DEPARTMENT_ID

FROM EMPLOYEES
WHERE DEPARTMENT_ID NOT IN(90,50)
GROUP BY DEPARTMENT_ID
HAVING(DEPARTMENT_ID)<=90;
Feedback
Question 6
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following query is correct which will display the same output as shown below?
Select one:

a. SELECT COUNTDISTINCT(MANAGER_ID) AS "NO. OF MANAGER_ID" FROM EMPLOYEES;

b. SELECT COUNT *(MANAGER_ID) AS "NO. OF MANAGER_ID" FROM EMPLOYEES;

c. SELECT COUNT(MANAGER_ID) AS "NO. OF MANAGER_ID" FROM EMPLOYEES;

d. SELECT COUNT(MANAGER_ID) NO. OF MANAGER_ID FROM EMPLOYEES;

Feedback
Question 7
Correct

Mark 0.67 out of 1.00

Flag question
Question text
Which of the following query is correct which will display the same output as shown below?
Select one:

a. SELECT MAX(FIRSTNAME), MANAGER_ID, COUNT(SALARY), AVG(SALARY)

FROM EMPLOYEES
GROUP BY MANAGER_ID
WHERE SALARY BETWEEN 6000 AND 10000
HAVING MIN(SALARY) >= 5000;

b. SELECT MAX(FIRSTNAME), MANAGER_ID, COUNT(SALARY), AVG(SALARY)

FROM EMPLOYEES
WHERE SALARY BETWEEN 6000 AND 10000
GROUP BY MANAGER_ID
HAVING (SALARY) >= 5000;

c. SELECT MAX(FIRSTNAME), MANAGER_ID, COUNT(SALARY), AVG(SALARY)

FROM EMPLOYEES
WHERE SALARY BETWEEN 10000 AND 6000
GROUP BY MANAGER_ID
HAVING MIN(SALARY) >= 5000;

d. SELECT MAX(FIRSTNAME), MANAGER_ID, COUNT(SALARY), AVG(SALARY)

FROM EMPLOYEES
WHERE SALARY BETWEEN 6000 AND 10000
HAVING MIN(SALARY) >= 5000
GROUP BY MANAGER_ID;
Feedback
Question 8
Correct

Mark 1.00 out of 1.00


Flag question

Question text
Which of the following query is correct which will display the same output as shown below?
Select one:

a. SELECT MIN(LASTNAME),MAX(FIRSTNAME),SUM(SALARY),AVG(SALARY)

FROM EMPLOYEES
WHERE JOB_ID LIKE 'ST%';

b. SELECT MIN(LASTNAME),MAX(FIRSTNAME),SUM(SALARY),AVG(SALARY)

FROM EMPLOYEES
WHERE JOB_ID LIKE '%ST%';

c. SELECT MIN(LASTNAME),MAX(FIRSTNAME),SUM(SALARY),AVG(SALARY)

FROM EMPLOYEES
WHERE JOB_ID LIKE '%ST';

d. SELECT MIN(LASTNAME),MAX(FIRSTNAME),SUM(SALARY),AVG(SALARY)

FROM EMPLOYEES
WHERE JOB_ID LIKE = ‘ST’;
Feedback
Question 9
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following query is correct which will display the same output as shown below?
Select one:
a. SELECT MIN(initcap(FIRSTNAME||' surnname is '||LASTNAME)) AS COMPLETE NAME,
MIN(MANAGER_ID) AS "LOWEST MANAGER_ID" FROM EMPLOYEES;

b. SELECT MIN(LOWER(FIRSTNAME||surnname is ||LASTNAME)) AS "COMPLETE NAME",


MIN(MANAGER_ID) AS "LOWEST MANAGER_ID" FROM EMPLOYEES;

c. SELECT MIN(LOWER(FIRSTNAME||' surnname is '||LASTNAME)) AS "COMPLETE NAME",


MIN(MANAGER_ID) AS "LOWEST MANAGER_ID" FROM EMPLOYEES;

d. SELECT MIN(initcap(FIRSTNAME||' surnname is '||LASTNAME)) AS "COMPLETE NAME",


MIN(MANAGER_ID) AS "LOWEST MANAGER_ID" FROM EMPLOYEES;

Feedback
Question 10
Correct

Mark 1.00 out of 1.00

Flag question

Question text
Which of the following query is correct which will display the same output as shown below?
Select one:

a. SELECT JOB_ID, COUNT(JOB_ID)"NO. OF JOB_ID", SUM(SALARY), AVG(SALARY)

FROM EMPLOYEES;

b. SELECT JOB_ID, COUNT*(JOB_ID)"NO. OF JOB_ID", SUM(SALARY), AVG(SALARY)

FROM EMPLOYEES
GROUP BY JOB_ID;

c. SELECT JOB_ID, COUNT(JOB_ID)"NO. OF JOB_ID", SUM(SALARY), AVG(SALARY)

FROM EMPLOYEES
GROUP BY JOB_ID;

d. SELECT JOB_ID, COUNTDISTINCT(JOB_ID)"NO. OF JOB_ID", SUM(SALARY), AVG(SALARY)

FROM EMPLOYEES
GROUP BY JOB_ID;

It is the term generally used to describe what was done by large mainframe computers from the
late 1940's until the early 1980's.

Data processing
Answer:

Check

This describes the database design at the logical level.

Logical schema
Answer:

Check

The overall logical structure schema of a database can be expressed graphically by anAnswer
E-R diagram
.

Check

Feedback
The overall design of the database is called the

Database schema
Answer:

Check

Feedback
Are applied to the table and form the logical schema.

Constraints
Answer:

Check

Feedback
It is collection of data that contains information relevant to an enterprise.

Database
Answer:

Check

Feedback
It is an association among several entities.

relationship
Answer:
Check

Feedback
It is a unit of data – is a symbol or a set of symbols which is used to represent something.

datum
Answer:

Check

Feedback
It is the collection of information stored in the database at a particular moment is called

instance of the database


Answer:

Check

Feedback
This is a characteristic of database that includes also the protection of the database from
unauthorized access confidentiality and unauthorized changes.

Data integrity
Answer:

Check

Feedback
It is design to manage large bodies of information.

Database system
Answer:

Check

Feedback
Are said to exhibit physical data independence if they do not depend on the physical schema.

Application program
Answer:

Check

Feedback
This describes the database design at the physical level.

Physical schema
Answer:

Check

Feedback
It is an interpreted data – data supplied with semantics.
Information
Answer:

Check

Feedback
It is a bundle of actions which are done within a database to bring it from one consistent state to
a new consistent state.
Transaction
Answer:

Check

Feedba
This is also known as facts that can be recorded and that have implicit meaning.

Data
Answer:

Check

Feedback
It is the collection of basic objects.

Entities
Answer:

Check

Which of the following is not part of transaction control?


Select one:

a. ROLLBACK

b. COMMIT

c. CREATE

d. SAVEPOINT

Check

Feedback
It is a collection of relations or two-dimensional tables controlled by the Oracle server.
Select one:
a. Database management system

b. Relational database

c. Relational server

d. Relational model

Check

Feedback
Which of the following is not part of data manipulation language?
Select one:

a. merge

b. Insert

c. Alter

d. Update

Check

Feedback
Which of the following is not part of data control language?
Select one:

a. Insert

b. Grant

c. Revoke

Check

Feedback
He proposed the relational model for database systems in 1970.
Select one:

a. Dr. E.F Codd

b. DrcL.F Codd
c. Dr. Lee Codd

d. Dr. J.F Codd

Check

Suppose that a user wanted to change the datatype of column ADDRESS from Varchar to Char
which of the following is the correct example.
Select one:

a. ALTER TABLE STUDENTS


SET ADDRESS VARCHAR(20);

b. ALTER STUDENTS
SET ADDRESS VARCHAR(20);

c. ALTER TABLE STUDENTS


MODIFY ADDRESS VARCHAR(20);

d. ALTER STUDENTS
MODIFY ADDRESS VARCHAR(20);

Check

Feedback
An alter statement that is used to update an existing column datatype or datatype size.
Select one:

a. ADD

b. MODIFY

c. DROP

d. DELETE

Check

Feedback
An alter statement that is used to delete an existing column in the table.
Select one:
a. MODIFY

b. DELETE

c. DROP

d. ADD

Check

Feedback
Suppose that a user wanted to add a new column name as CITY datatype set to char size 10.
Which of the following is the correct sql statement?
Select one:

a. ALTER TABLE STUDENTS


ADD CITY CHAR(10);

b. ALTER TABLE STUDENTS


ADD COLUMN CITY VARCHAR(10);

c. ALTER TABLE STUDENTS


ADD COLUMN CITY CHAR(10);

d. ALTER TABLE STUDENTS


ADD CITY VARCHAR(10);

Check

Feedback
Which of the following datatype is not being used in oracle?
Select one:

a. NUMBER

b. VARCHAR

c. CHAR

d. INT

Check
Feedback
Basic unit of storage composed of rows and columns
Select one:

a. Synonym

b. Table

c. View

d. Index

Check

Feedback
It logically represents subsets of data from one or more table.
Select one:

a. View

b. Synonym

c. Table

d. Index

Check

Feedback
A statement that is use to rename the table or change the existing name of the table.
Select one:

a. Rename

b. Alias

c. Update

d. Name

Check

Feedback
An alter statement that is used to add new column to the table.
Select one:

a. MODIFY

b. DELETE

c. ADD

d. DROP

Check

Feedback
Which of the following is not true about ALTER statement?
Select one:

a. Define a default value for the new column

b. Drop a column

c. Modify an existing column definition

d. Insert new row in a table

Check

Suppose that a user wanted to insert a new value using the explicit method which of the
following is the correct example.
Select one:

a. INSERT INTO STUDENTS VALUES (USN_ID, FIRSTNAME)


(10,’ELENA’)

b. INSERT INTO STUDENTS VALUES (10,’ELENA’)

c. INSERT INTO STUDENST(USN_ID, FIRSTNAME)


VALUES(10,’ELENA’)

d. INSERT INTO STUDENTS VALUES (10, NULL,’ELENA’,NULL);

Check
Feedback
Suppose that a user wanted to update the lastname of student to ‘Santos’ and YR_LVL to ‘Irreg’
whose USN_ID is equal to 50, in one select statement which of the following is the correct sql
statement to use.
Select one:

a. UPDATE STUDENTS
SET LASTNAME = ‘SANTOS’, YR_LVL = ‘IRREG’
WHERE USN_ID = 50;

b. UPDATE STUDENTS
SET LASTNAME = ‘SANTOS’, SET YR_LVL = ‘IRREG’;

c. UPDATE STUDENTS
SET LASTNAME = ‘SANTOS’, YR_LVL = ‘IRREG’;

d. UPDATE STUDENTS
SET LASTNAME = ‘SANTOS’, SET YR_LVL = ‘IRREG’
WHERE USN_ID = 50;

Check

Feedback
Consists of a collection of DML statements that form a logical unit of work.
Select one:

a. Select

b. Transaction

c. DDL

d. DML

Check

Feedback
Suppose that a user uses the DELETE statement as shown below: what is/are the possible
output.

DELETE from STUDENT;


Select one:

a. 0 rows are deleted.


b. 0 rows are updated.

c. All rows are deleted including table structure.

d. All rows are deleted but the table is still intact.

Check

Feedback
Suppose that a user wanted to insert a new value using the implicit method which of the
following is the correct example.
Select one:

a. INSERT INTO STUDENTS VALUES (10,’ELENA’)

b. INSERT INTO STUDENTS VALUES (10, NULL,’ELENA’,NULL);

c. INSERT INTO STUDENST(USN_ID, FIRSTNAME)


VALUES(10,’ELENA’)

d. INSERT INTO STUDENTS VALUES (USN_ID, FIRSTNAME)


(10,’ELENA’)

Check

Feedback
A type of insert statement that specify the NULL keyword in the VALUES clause.
Select one:

a. Explicit

b. included

c. Excluded

d. Implicit

Check

Feedback
A type of insert statement that omit the column from the column list.
Select one:

a. Excluded
b. included

c. Implicit

d. Explicit

Check

Feedback
A type of DML statement that is use to update existing rows in a table.
Select one:

a. UPDATE

b. DELETE

c. INSERT

d. TRUNCATE

Check

Feedback
A type of DML statement that is use to remove existing rows in a table.
Select one:

a. INSERT

b. DELETE

c. UPDATE

d. TRUNCATE

Check

Feedback
A type of DML statement that is use to add new rows in a table.
Select one:

a. DELETE

b. INSERT
c. TRUNCATE

d. UPDATE

Check

This character is used to override the default precedence or to clarify the statement.
Select one:

a. ( )

b. *

c. AS

d. ||

Check

Feedback
Which of the following is not true about writing SQL statements?
Select one:

a. Keywords cannot be split across lines or abbreviated.

b. SQL statements are case sensitive.

c. Clauses are usually placed on separate lines for readability and ease of editing.

d. Indents should be used to make code more readable.

Check

Feedback
Supposed that the user uses the ff SELECT statement: what will be the possible output.
SELECT GRADE AS STUDENT MARK FROM GRADE_REPORT;
Select one:

a. Error because of missing “” mark.

b. Will display the column GRADE rename as STUDENT MARK


c. Error because of the keyword AS.

d. Will display all rows and columns.

Check

Feedback
This is use to create expression with number and date values.
Select one:

a. Arithmetic expression

b. Logical Condition

c. MDAS operator

d. Numerical Values

Check

Feedback
This is used to brings together data that is stored in different tables by specifying the link
between them.
Select one:

a. Projection

b. Joins

c. Inclusion

d. Selection

Check

Feedback
This is used to selects the rows in a table that are returned by a query. Various criteria can be
used to restrict the rows that are retrieved.
Select one:

a. Projection

b. Joins
c. Inclusion

d. Selection

Check

Feedback
It is a value that is unavailable, unassigned, unknown, or inapplicable.
Select one:

a. NULL

b. Blank

c. Space

d. Zero

Check

Feedback
A system used to concatenate one column to another column.
Select one:

a. ||

b. ( )

c. AS

d. *

Check

Feedback
This is use to Selects the columns in a table that are returned by a query. Selects a few or as
many of the columns as required.
Select one:

a. Projection

b. Joins
c. Inclusion

d. Selection

Check

Feedback
It is a character, a number, or a date that is included in the SELECT statement.
Select one:

a. String

b. Alias

c. Literal

d. Table name

Check

True/False. Character strings and date values are enclosed with double quotation marks.

False
Answer:
Feedback
This is used to perform wildcard searches of valid search string values.
Select one:

a. Comparison

b. Between

c. IN

d. Like
Feedback
True/False Character values are format sensitive and date values are case sensitive-sensitive.

False
Answer:
Feedback
This is used to display rows based on a range of values.
Select one:

a. Comparison

b. Like

c. Between

d. IN
Feedback
This is used to test for values in a specified set of values.
Select one:

a. Between

b. IN

c. Like

d. Comparison
Feedback
True/False. A null value means that the value is unavailable, unassigned, unknown, or
inapplicable.

True
Answer:
Feedback
True/False. The != not equal to symbol is also equal to this symbol<>.

True
Answer:
Feedback
This is used to restrict the rows that are returned by a query.
Select one:

a. Select

b. Insert

c. Delete

d. Where
Feedback
True/False. This symbol % denotes zero or many characters.

True
Answer:
Feedback
This is used to in conditions that compare one expression with another value or expression.
Select one:

a. Comparison

b. Add

c. Logical Condition

d. Subtraction

It is use to accept numeric input and return numeric values.


Select one:

a. Multiple row function

b. Character function

c. Number function

d. Case manipulation function


Feedback
This is use to return one result per group of row.
Select one:

a. Single row

b. Dual table

c. Multiple row

d. Number function
Feedback
This is use to accept character input and can return both character and number values.
Select one:
a. Multiple row function

b. Number function

c. Character function

d. Case manipulation function


Feedback
This is use to accept character input and can return both character and number values.
Select one:

a. Multiple row function

b. Number function

c. Character function

d. Case manipulation function


Feedback
Trims leading or trailing characters (or both) from a character string.
Select one:

a. Trim

b. Length

c. INSTR

d. SUBSTR
Feedback
This is use to find the numeric position of a named character starting at character position n.
Select one:

a. INSTR

b. Length

c. SUBSTR

d. Trim
Feedback
It is a table that is owned by the user SYS and can be accessed by all users.
Select one:

a. Authors

b. Parts

c. Dual

d. Employees
Feedback
This is use to return one result per row.
Select one:

a. Dual table

b. Single row

c. Multiple row

d. Number function
Feedback
Extracts a string of determined length.
Select one:

a. Trim

b. Length

c. SUBSTR

d. INSTR
Feedback
What is the return value if the user try to do the following:
SELECT TRUNC (65.73,-2) FROM DUAL;
Select one:

a. 600

b. 0
c. 00

d. 60

True or False
Database Management System is a collection of interrelated data and a set of programs to
access those data.
True
Answer:
Feedback
Suppose that the user wanted to add a new column name as CUST_NAME data type char size
6. What is the correct SQL statement to use?
Select one:

a. ALTER PARTS
SET CUST_NAME = CHAR(6);

b. ALTER TABLE PARTS


SET CUST_NAME = CHAR(6);

c. ALTER TABLE PARTS


ADD CUST_NAME CHAR(6);

d. ALTER PARTS
ADD CUST_NAME CHAR(6);
Feedback
Which of the following is not part of handling data?
Select one:

a. Semi-Computerized

b. File Oriented Approach

c. Data Management Systems

d. Data Processing
Feedback
Which of the following is not part of common Comparison operator?
Select one:

a. >
b. !=

c. <

d. LIKE
Feedback
Refer to table 1.0, suppose that user insert the following values using the statement below what
would be the possible output?

INSERT INTO ORGCHART VALUES (11,’YAMBAO,JUN’, NULL, NULL);


Select one:

a. The ORG and POSITION of YAMBAO will automatically sets to N/A

b. The ORG and POSITION of YAMBAO will automatically sets to None.

c. The ORG and POSITION of YAMBAO will automatically sets to NULL.

d. Cannot insert the record because of missing values for ORG and POSITION.
Feedback
True or False:
Security is one of the characteristics of the database that includes also the protection of the
database from unauthorized access confidentiality and unauthorized changes.
False
Answer:
Feedback
Refer to table 1.0, suppose that user update the table using the statement below what would be
the possible output?
UPDATE ORGCHART
SET ORG = ‘PCS’
WHERE ORG IS NULL;
Select one:

a. 1 row/s is updated

b. Incorrect WHERE condition must be =NULL

c. 2 rows/ is updated

d. 0 row/s is updated
Feedback
Which of the following is not part of characteristics of database?
Select one:

a. Data Persistence

b. Transactions

c. Data Integrity

d. Data Processing
Feedback
Refer to table 1.0 Using the SELECT statement below what would be the possible output:

SELECT NAME, ORG, POSITION


FROM ORGCHAR
WHERE ORG =’JPCS’
OR POSITION = ‘SEC’;
Select one:

a. Incorrect SELECT statement

b. It will retrieve the record of JOAN andROAN

c. 0 rows selected

d. It will retrieve the record of JOAN,ROAN and JUN


Feedback
True or False:
Database Architecture is the overall design of the database
False
Answer:
Feedback
Suppose that the user wanted to add a new column name as CUST_NAME data type char size
6. What is the correct type of statement to use?
Select one:

a. UPDATE

b. DELETE
c. INSERT

d. ALTER
Feedback
Which of the following is not the correct example of entity?
Select one:

a. EMPLOYEES

b. ORDERS

c. STUDENT

d. Phone_no
Feedback
Which of the following is not part of DDL statement?
Select one:

a. DELETE

b. ALTER

c. CREATE

d. None of the choices


Feedback
Which of the following is not part of DML statement?
Select one:

a. UPDATE

b. INSERT

c. MERGER

d. CREATE table
Feedback
Which of the following is not part of disadvantage of database?
Select one:
a. Data integrity

b. Lower Efficiency

c. Costs

d. Qualified Personnel
Feedback
Refer to table 1.0 Using the SELECT statement below what would be the possible output:

SELECT NAME, ORG, POSITION


FROM ORGCHAR
WHERE ORG =’JPCS’
OR POSITION = ‘SEC’
AND NAME LIKE ‘%N’;
Select one:

a. Incorrect SELECT statement

b. 0 rows selected

c. It will retrieve the record of JOAN,ROAN and JUN

d. It will retrieve the record of JOAN and ROAN


Feedback
Which of the following is not part of basic SELECT statement
Select one:

a. Concat

b. Alias

c. Specific Column

d. Logical condition
Feedback
True or False:
Database is the term generally used to describe what was done by large mainframe computers
from the late 1940's until the early 1980's.
False
Answer:
Feedback
Refer to table 1.0 Using the SELECT statement below what would be the possible output:

SELECT NAME, ORG, POSITION, ID * (100 + 3)


FROM ORGCHAR
WHERE ORG = ‘AMATHS’
Select one:

a. It will retrieve the record of ANNA with new ID of 10

b. It will retrieve the record of ANNA with new ID of 1003

c. It will retrieve the record of ANNA with new ID of 1030

d. 0 rows selected
Feedback
Refer to table 1.0 Using the SELECT statement below what would be the possible output:

SELECT NAME, ORG, POSITION


FROM ORGCHAR
WHERE NAME LIKE ‘A%’
AND POSITION = ‘SEC’;
Select one:

a. It retrieves the record of AGAPITO

b. Incorrect SELECT statement

c. It retrieves the record of ANNA and MOJICA

d. 0 rows selected / no rows selected


Feedback
Which of the following is not part of other Comparison Operator?
Select one:

a. <>

b. IS NUL
c. IN

d. Between AND
Feedback
Refer to table 1.0, suppose that user insert the following values using the statement below what
would be the possible output?

INSERT INTO ORGCHART (ID, NAME)


VALUES (11,’YAMBAO,JUN’);
Select one:

a. The ORG and POSITION of YAMBAO will automatically sets to NULL.

b. The ORG and POSITION of YAMBAO will automatically sets to None.

c. Cannot insert the record because of missing values for ORG and POSITION

d. The ORG and POSITION of YAMBAO will automatically sets to N/A.


Feedback
True or False
Table is known as the collection of data that contains information relevant to an enterprise.
False
Answer:
Feedback
Which of the following is not part of advantage of database?
Select one:

a. Data integrity and security

b. Data independence

c. Database instance

d. Efficient data access


Feedback
Refer to table 1.0 Using the SELECT statement below what would be the possible output:

SELECT NAME, ORG, POSITION


FROM ORGCHAR
WHERE NAME LIKE ‘%A’;
Select one:

a. 0 rows selected / no rows selected

b. Incorrect SELECT statement

c. It retrieves the record of AGAPITO

d. It retrieves the record of ANNA and MOJICA

A type of function that helps how to group rows in a table into smaller sets and how to specify
search criteria for groups of rows.
Group function
Answer:
Feedback
A type of function that accept numeric input and return numeric values
Number function
Answer:
Feedback
A type of function returns one result per group of row
Multiple-row function
Answer:
Feedback
Base on the given table.
What is the maximum on hand from parts when this SQL statement is executed?
50
SELECT MAX(ONHAND) FROM PARTS; Answer

What is the minimum warehouse from parts when this SQL statement is executed?
1
SELECT MIN(WAREHOUSE) FROM PARTS; Answer

What is the character position of ‘O’ of the description Microware Oven from parts when this
SQL statement is executed?
5
SELECT INSTR(DESCRIPTION,'O') FROM PART; Answer
What is the length of description Cordless Drill from parts when this SQL statement is
executed?
14
SELECT LENGTH(DESCRIPTION) FROM PART; Answer

How many warehouse are there when this SQL statement is executed?
10
SELECT COUNT(WAREHOUSE) FROM PARTS; Answer

How many warehouse are there when this SQL statement is executed?
3
SELECT COUNT(distinct WAREHOUSE) FROM PARTS; Answer

How many warehouse are there when this SQL statement is executed?
10
SELECT COUNT(*) FROM PARTS; Answer

What is the truncated value of 78.90 when this SQL statement is executed?
0
SELECT TRUNC(78.90,-2) FROM DUAL; Answer

What is the round of value of 78.90 when this SQL statement is executed?
100
SELECT ROUND(78.90,-2) FROM DUAL; Answer
What is the round of value of 78.90 when this SQL statement is executed?
78.9
SELECT ROUND(78.90,1) FROM DUAL; Answer
Feedback
A type of function returns one result per row.
Single-row function
Answer:
Feedback
This query returns rows that are common to both queries.
Intersect
Answer:
Feedback
This query returns rows from both queries including all duplications

union all
Answer:
Feedback
It combines the results of two or more component queries into one result.
Set operators
Answer:
Feedback
This query returns rows in the first query that are not present in the second query.
Minus
Answer:
Feedback
This query returns the rows from both queries after eliminating duplications.

Union
Answer:
Feedback
A type of function that accepts character input and can return both character and number
values.

Character function
Answer:

You might also like