0% found this document useful (0 votes)
73 views

Dbms

The document is a review of answers to a pre-final exam on database concepts. It includes 16 multiple choice questions with feedback on correct and incorrect answers. The questions cover topics like SQL statements, functions, data types, and grouping. The review allows the user to check their understanding on database fundamentals before taking the final exam.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Dbms

The document is a review of answers to a pre-final exam on database concepts. It includes 16 multiple choice questions with feedback on correct and incorrect answers. The questions cover topics like SQL statements, functions, data types, and grouping. The review allows the user to check their understanding on database fundamentals before taking the final exam.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Home / My courses / UGRD-IT6202-2212S / PRE FINAL EXAMINATION / PRE FINAL EXAMINATION

Started on Sunday, 4 December 2022, 2:01 PM


State Finished
Completed on Sunday, 4 December 2022, 2:09 PM
Time taken 7 mins 26 secs
Marks 7.00/50.00
Grade 14.00 out of 100.00

Question 1
Complete

Mark 0.00 out of 1.00

Which of the following is not part of basic SELECT statement

Select one:
a. Alias
b. Specific Column
c. Concat
d. Logical condition

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 1/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 2

Complete

Mark 1.00 out of 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 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. kingwith a salary of 24000                       4
hunoldwith a salary of 2400                     6

b. KINGWITH A SALARY OF 24000                  4


HUNOLDWITH A SALARY OF 2400             6

c. KING WITH A SALARY OF 24000                  4


HUNOLDWITH A SALARY OF 2400               6

d. king with a salary of 24000                       4


hunoldwith a salary of 2400                      6

Your answer is correct.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 2/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 3

Complete

Mark 0.00 out of 1.00

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 SUBSTR(JOB_ID,4)='REP';

b. SELECT JOB_ID FROM EMPLOYEES


WHERE JOB_ID LIKE ‘%REP%’;

c. SELECT JOB_ID FROM EMPLOYEES


WHERE SUBSTR='REP';

d. SELECT JOB_ID FROM EMPLOYEES


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

Your answer is incorrect.

Question 4
Complete

Mark 1.00 out of 1.00

True/False. Database Management System is a collection of interrelated data and a set of programs to access those data.

Answer: True

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 3/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 5

Complete

Mark 0.00 out of 1.00

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. INSERT
b. DELETE
c. UPDATE
d. ALTER

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 4/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 6

Complete

Mark 1.00 out of 1.00

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 OR 90;

b. SELECT TRIM('A' FROM LASTNAME)

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(LASTNAME,’A’)
FROM EMPLOYEES

WHERE DEPARTMENT_ID BETWEEN 60 AND 90;

Your answer is correct.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 5/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 7

Not answered

Marked out of 1.00

SELECT COUNT(PRICE) FROM STOCKS;

Answer:

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 6/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 8

Complete

Mark 0.00 out of 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 TRUNC(563.396,1)FROM DUAL;

Select one:
a. 563

b. 500

c. 563.39

d. 563.3

Your answer is incorrect.

Question 9
Complete

Mark 1.00 out of 1.00

Provide the best answer for the following statement.

A type of function returns one result per group of row

Answer: Multiple-row functions

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 7/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 10

Complete

Mark 0.00 out of 1.00

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

Select one:
a. Number function
b. Multiple row
c. Single row
d. Dual table

Question 11
Complete

Mark 0.00 out of 1.00

Provide the best answer for the following statement.

This query returns rows that are common to both queries.

Answer: Number function

Question 12
Complete

Mark 0.00 out of 1.00

Provide the best answer for the following statement.


This query returns the rows from both queries after eliminating duplications.

Answer: Dual table

Question 13
Not answered

Marked out of 1.00

Provide the best answer for the following statement.


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.

Answer:

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 8/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 14

Complete

Mark 0.00 out of 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 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              17000$$$
LEX          17000              17000$$$

b. NENA       17000              $$$18600


LEX          17000              $$$18600

c. NENA       17000              18600$$$


LEX          17000              18600$$$

d. NENA       17000              $$$17000


LEX          17000              $$$17000

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 9/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 15

Complete

Mark 0.00 out of 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 MOD(SALARY,10) AS “EXCESS SALARY”

FROM EMPLOYEES

WHERE SALARY < 5000;

Select one:
a. 3
3
3
3
3
3

b. 3
3
3
3
3

c. 0
0
0
0
0

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 10/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

d. 0
0
0
0
0
0

Your answer is incorrect.

Question 16
Complete

Mark 0.00 out of 1.00

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. Case manipulation function
d. Character function

Question 17
Not answered

Marked out of 1.00

SELECT MIN(ID) FROM STOCKS;

Answer:

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 11/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 18

Complete

Mark 0.00 out of 1.00

It is a table that is owned by the user SYS and can be accessed by all users.

Select one:
a. Parts
b. Dual
c. Authors
d. Employees

Question 19
Complete

Mark 0.00 out of 1.00

Which of the following is not the correct example of entity?

Select one:
a. ORDERS
b. Phone_no
c. EMPLOYEES
d. STUDENT

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 12/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 20

Complete

Mark 0.00 out of 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 (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. ABEL ELLEN                  SA_REP


TALOR JONATHAN       SA_REP
GRAN TKIMBERLY       SA_REP

c. ABELELLEN                  SA_REP
TALORJONATHAN       SA_REP
GRANTKIMBERLY       SA_REP

d. ABELELLEN                  SA_REP

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 13/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 21

Complete

Mark 0.00 out of 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 TRUNC(563.396,-2) FROM DUAL;

Select one:
a. 563.39

b. 563.3

c. 563

d. 500

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 14/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 22

Not answered

Marked out of 1.00

SELECT AVG(NVL(QTY,0)) FROM STOCKS;

Answer:

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 15/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 23

Complete

Mark 0.00 out of 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 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

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 16/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Your answer is incorrect.

Question 24
Complete

Mark 0.00 out of 1.00

Which of the following is not part of DDL statement?

Select one:
a. DELETE
b. None of the choices
c. ALTER
d. CREATE

Question 25
Not answered

Marked out of 1.00

SELECT MIN(PRICE) FROM STOCKS;

Answer:

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 17/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 26

Not answered

Marked out of 1.00

SELECT COUNT(*) FROM STOCKS;

Answer:

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 18/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 27

Complete

Mark 0.00 out of 1.00

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 RPAD(SALARY,15,'$'), LPAD(SALARY,10,'@')
FROM EMPLOYEES

WHERE EMPLOYEE_ID IN (201,176,144);

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

FROM EMPLOYEES
WHERE EMPLOYEE_ID = (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);

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 19/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 28

Complete

Mark 0.00 out of 1.00

Extracts a string of determined length.

Select one:
a. SUBSTR

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 20/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

b. Length
c. INSTR
d. Trim

Question 29
Complete

Mark 0.00 out of 1.00

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
left 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||(SALARY,6,'*')) AS "EMPLOYEES AND THEIR SALARIES"
FROM EMPLOYEES

WHERE MANAGER_ID IS 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 = NULL

OR SALARY BETWEEN 4000 AND 6000;

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


FROM EMPLOYEES

WHERE MANAGER_ID IS NULL


OR SALARY BETWEEN 4000 AND 6000;

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 21/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 30

Complete

Mark 0.00 out of 1.00

This is used to converts the first letter of each word to uppercase and the remaining letters to lowercase.

Select one:
a. Upper case
b. INITCAT
c. Sentence case
d. lowercase

Question 31
Complete

Mark 0.00 out of 1.00

Which of the following is not part of DML statement?

Select one:
a. CREATE table
b. MERGER
c. INSERT
d. UPDATE

Question 32
Complete

Mark 1.00 out of 1.00

Which of the following is not part of common Comparison operator?

Select one:
a. <
b. LIKE
c. >
d. !

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 22/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 33

Complete

Mark 0.00 out of 1.00

Which of the following is not part of disadvantage of database?

Select one:
a. Lower Efficiency
b. Qualified Personnel
c. Data integrity
d. Costs

Question 34
Complete

Mark 0.00 out of 1.00

Which of the following is not part of other Comparison Operator?

Select one:
a. IN
b. Between AND
c. IS NUL
d. <>

Question 35
Complete

Mark 0.00 out of 1.00

Which of the following is not part of handling data?

Select one:
a. File Oriented Approach
b. Data Processing
c. Data Management Systems
d. Semi-Computerized

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 23/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 36

Complete

Mark 0.00 out of 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. ZLOTKEY                       ZLOTKEY     80        100

b. RAJS                                 RAJS               50        124

c. ZLOYEY                          TRINA     80        200

d. MOURGOS                      MOURGOS    50        100

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 24/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 37

Complete

Mark 1.00 out of 1.00

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 8300 AND 4400;

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

FROM EMPLOYEES
WHERE SALARY BETWEEN 4400 AND 8300;

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;

Your answer is correct.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 25/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 38

Complete

Mark 0.00 out of 1.00

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 DESC;

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


AS "DREAM SALARIES"

FROM EMPLOYEES

ORDER BY SALARY;

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

AS "DREAM SALARIES"
FROM EMPLOYEES

ORDER BY SALARY;

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


AS "DREAM SALARIES"

FROM EMPLOYEES
ORDER BY SALARY DESC;

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 26/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 39

Complete

Mark 0.00 out of 1.00

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%';

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 27/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 40

Not answered

Marked out of 1.00

True/False. Table is known as the collection of data that contains information relevant to an enterprise.

Answer:

Question 41
Not answered

Marked out of 1.00

Provide the best answer for the following statement.

A type of function returns one result per row.

Answer:

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 28/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 42

Complete

Mark 1.00 out of 1.00

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, LPAD(SALARY,15,'$')
FROM EMPLOYEES

WHERE DEPARTMENT_ID = 60 OR JOB_ID LIKE '_T';

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

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

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

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 OR JOB_ID LIKE 'T';

Your answer is correct.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 29/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 43

Not answered

Marked out of 1.00

Provide the best answer for the following statement.


It combines the results of two or more component queries into one result.

Answer:

Question 44
Complete

Mark 0.00 out of 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 TRUNC(563.396,2)FROM DUAL;

Select one:
a. 563.3

b. 563.39

c. 563

d. 500

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 30/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 45

Not answered

Marked out of 1.00

Provide the best answer for the following statement.

This query returns rows from both queries including all duplications

Answer:

Question 46
Not answered

Marked out of 1.00

SELECT SUM(QTY) FROM STOCKS WHERE WAREHOUSE IN (1,5) GROUP BY WAREHOUSE HAVING MAX(WAREHOUSE) >=5;

Answer:

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 31/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 47

Not answered

Marked out of 1.00

SELECT AVG(WAREHOUSE) FROM STOCKS;

Answer:

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 32/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 48

Complete

Mark 0.00 out of 1.00

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 FIRSTNAME AS PANGALAN
FROM EMPLOYEES

WHERE JOB_ID = 'SA_REP';

b. SELECT UPPER(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) PANGALAN


FROM EMPLOYEES

WHERE JOB_ID = 'SA_REP';

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 33/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 49

Complete

Mark 0.00 out of 1.00

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%';

Your answer is incorrect.

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 34/35
12/4/22, 11:51 PM PRE FINAL EXAMINATION: Attempt review

Question 50

Not answered

Marked out of 1.00

SELECT COUNT (AVG(PRICE)) FROM STOCKS GROUP BY WAREHOUSE;

Answer:

◄ MIDTERM LAB EXAMINATION

Jump to...

PRE FINAL LAB EXAMINATION ►

semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=97261&cmid=3799 35/35

You might also like