Вы находитесь на странице: 1из 33

# 

## Home My courses CS-350-LEC-1913T Week 14: Final Exam Finals

Question 1 This is use to return one result per row.
 Not yet
Select one:
 Marked out of
a. Single row
1.00

 b. Multiple row

c. Dual table

d. Number function

Clear my choice

Question 2 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
1.00

## 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. 563.39

c. 500

d. 563.3

Clear my choice
Question 3 It is a table that is owned by the user SYS and can be accessed
Not yet by all users.

## Marked out of Select one:

 1.00
a. Dual

 b. Authors

c. Parts

d. Employees

 Clear my choice

Question 4
 Not yet

 Marked out of
1.00

## SELECT COUNT(*) FROM STOCKS;

Question 5 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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 MIN(LASTNAME), AVG(SALARY)
FROM EMPLOYEES
GROUP BY JOB_ID
WHERE JOB_ID LIKE ‘%REP%’

HAVING MAX(SALARY)>500;

FROM EMPLOYEES

## WHERE JOB_ID NOT LIKE ‘%REP%’

GROUP BY JOB_ID
HAVING MAX(SALARY)>500;

c. SELECT CONCAT(DEPARTMENT_ID,JOB_ID),MIN(SALARY),
MAX(SALARY)
FROM EMPLOYEES
GROUP BY JOB_ID;

FROM EMPLOYEES

## WHERE JOB_ID LIKE ‘%REP%’

GROUP BY JOB_ID
HAVING MAX(SALARY)>500;

Clear my choice
Question 6 Which of the following query is correct which will display the
Not yet same output as shown below?

Marked out of
 1.00

Select one:
 a. SELECT MAX(LASTNAME||','||FIRSTNAME) AS NAME, MIN(SALARY)
FROM EMPLOYEES;

b. SELECT MAX(LASTNAME||FIRSTNAME) AS NAME, MAX(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;

Clear my choice
Question 7 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

## 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

## c. ABEL ELLEN                  SA_REP

TALOR JONATHAN       SA_REP
GRAN TKIMBERLY       SA_REP

d. ABELELLEN                  SA_REP
TALORJONATHAN       SA_REP
GRANTKIMBERLY       SA_REP

Clear my choice
Question 8 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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(LASTNAME,’A’)
FROM EMPLOYEES
WHERE DEPARTMENT_ID BETWEEN 60 AND 90;

## b. SELECT TRIM('A' FROM LASTNAME)

FROM EMPLOYEES
WHERE DEPARTMENT_ID BETWEEN 90 AND 60;

## c. SELECT TRIM('A' FROM LASTNAME)

FROM EMPLOYEES
WHERE DEPARTMENT_ID BETWEEN 60 AND 90;

## d. SELECT TRIM('A' FROM LASTNAME)

FROM EMPLOYEES
WHERE DEPARTMENT_ID BETWEEN 60 OR 90;

Clear my choice
Question 9 Which of the following query is correct which will display the
Not yet same output as shown below?

Marked out of
 1.00

Select one:
a. SELECT JOB_ID, COUNT*(JOB_ID)"NO. OF JOB_ID",

SUM(SALARY), AVG(SALARY)
FROM EMPLOYEES
GROUP BY JOB_ID;

## b. SELECT JOB_ID, COUNTDISTINCT(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, COUNT(JOB_ID)"NO. OF JOB_ID",

SUM(SALARY), AVG(SALARY)
FROM EMPLOYEES;

Clear my choice

Not yet string.

## Marked out of Select one:

1.00
a. Trim

b. SUBSTR

c. INSTR

d. Length

Clear my choice
Question 11 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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:
FROM EMPLOYEES
WHERE EMPLOYEE_ID IN (201,176,144);

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

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

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

Clear my choice
Question 12 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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 MONTHLY BUT WANTS' || SALARY *
3)
AS "DREAM SALARIES"
FROM EMPLOYEES

ORDER BY SALARY;

## b. SELECT (FIRSTNAME||' EARNS '|| SALARY || 'MONTHLY BUT

WANTS' || SALARY * 3)
AS "DREAM SALARIES"

FROM EMPLOYEES
ORDER BY SALARY DESC;

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

3)
AS "DREAM SALARIES"
FROM EMPLOYEES

## d. SELECT (FIRSTNAME||' EARNS '|| SALARY || 'MONTHLY BUT

WANTS' || SALARY * 3)
AS "DREAM SALARIES"
FROM EMPLOYEES
ORDER BY SALARY;

Clear my choice
Question 13 Which of the following query is correct which will display the
Not yet same output as shown below?

Marked out of
 1.00

Select one:
 a. SELECT MIN(LASTNAME), JOB_ID, MAX(SALARY)
FROM EMPLOYEES
 WHERE JOB_ID LIKE 'REP%'
GROUP BY JOB_ID;

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

FROM EMPLOYEES
WHERE JOB_ID LIKE '%REP%';

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

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

FROM EMPLOYEES

GROUP BY JOB_ID;

Clear my choice

Question 14

Not yet

Marked out of
1.00

## SELECT SUM(QTY) FROM STOCKS WHERE WAREHOUSE IN (1,5) GROUP

BY WAREHOUSE HAVING MAX(WAREHOUSE) >=5;

Question 15 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

## 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

Clear my choice

## Question 16 This is used to converts the first letter of each word to

Not yet uppercase and the remaining letters to lowercase.

## Marked out of Select one:

1.00
a. lowercase

b. Upper case

c. INITCAT

d. Sentence case

Clear my choice
Question 17 This is use to accept character input and can return both
Not yet character and number values.

## Marked out of Select one:

 1.00
a. Multiple row function

 b. Character function

c. Number function

d. Case manipulation function

 Clear my choice

Question 18 Extracts a string of determined length.
 Not yet
Select one:
 Marked out of
a. SUBSTR
1.00
b. Length

c. INSTR

d. Trim

Clear my choice

Question 19

Not yet

Marked out of
1.00

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

Question 20 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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) AS PANGALAN
FROM EMPLOYEES
WHERE JOB_ID IS '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 = 'SA_REP';

## d. SELECT UPPER(FIRSTNAME) PANGALAN

FROM EMPLOYEES
WHERE JOB_ID = 'SA_REP';

Clear my choice
Question 21 Which of the following query is correct which will display the
Not yet same output as shown below?

Marked out of
 1.00

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

Clear my choice

Question 22

Not yet

Marked out of
1.00

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

Not yet
Select one:
Marked out of
a. Number function
1.00
b. Dual table

c. Single row

d. Multiple row

Clear my choice
Question 24 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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

## d. SELECT FIRSTNAME, LENGTH(FIRSTNAME) AS "NUMBER OF

CHARACTER"
FROM EMPLOYEES
WHERE SALARY BETWEEN 4400 AND 8300;

Clear my choice
Question 25 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

## 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
hunoldwith a salary of 2400                      6

## b. KING WITH 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. kingwith a salary of 24000                       4

hunoldwith a salary of 2400                     6

Clear my choice

Question 26
Not yet

Marked out of
1.00

## SELECT MAX(NAME) FROM STOCKS;

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

Marked out of
 1.00

Select one:

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

FROM EMPLOYEES

##  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(DEPARTMENT_ID)<=90;

DEPARTMENT_ID
FROM EMPLOYEES

## WHERE DEPARTMENT_ID IN(90,50)

GROUP BY DEPARTMENT_ID

HAVING MIN(DEPARTMENT_ID)<=90;

## d. 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;

Clear my choice
Question 28 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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||RPAD(SALARY,6,'*')) AS "EMPLOYEES AND
THEIR SALARIES"
FROM EMPLOYEES
WHERE MANAGER_ID IS NULL

SALARIES"
FROM EMPLOYEES

## WHERE MANAGER_ID IS NULL

OR SALARY BETWEEN 4000 AND 6000;

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

THEIR SALARIES"
FROM EMPLOYEES
WHERE MANAGER_ID IS NULL

THEIR SALARIES"
FROM EMPLOYEES

## WHERE MANAGER_ID = NULL

OR SALARY BETWEEN 4000 AND 6000;

Clear my choice
Question 29 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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

GROUP BY JOB_ID
WHERE LASTNAME LIKE '%N'

HAVING AVG(SALARY)>10000;

## d. 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;

Clear my choice
Question 30 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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,'\$') AS SALARY
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';

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

Clear my choice

## Question 31 It is use to accept numeric input and return numeric values.

Not yet
Select one:
Marked out of
a. Multiple row function
1.00
b. Character function

c. Number function

## d. Case manipulation function

Clear my choice
Question 32 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

## 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. 563.3

c. 563.39

d. 500

Clear my choice
Question 33 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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
HAVING MAX(SALARY)<10000

GROUP BY DEPARTMENT_ID;

b. SELECT MIN(FIRSTNAME||LASTNAME)
FROM EMPLOYEES

GROUP BY DEPARTMENT_ID
HAVING MAX(SALARY);

c. SELECT MIN(FIRSTNAME||LASTNAME)
FROM EMPLOYEES
GROUP BY DEPARTMENT_ID

HAVING MAX(SALARY)<10000;

d. SELECT MIN(FIRSTNAME,LASTNAME)
FROM EMPLOYEES

GROUP BY DEPARTMENT_ID
HAVING MAX(SALARY)<10000;

Clear my choice

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

Marked out of
1.00

Select one:
a. SELECT COUNT(*) FROM EMPLOYEES;

## c. SELECT COUNT ALL FROM EMPLOYEES;

Clear my choice
Question 35 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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;

## b. 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;

## c. 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;

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

Clear my choice

Question 36 What is the return value if the user try to do the following:
Not yet SELECT TRUNC (65.73,-2) FROM DUAL;

## Marked out of Select one:

1.00
a. 60

b. 0

c. 600

d. 00

Clear my choice
Question 37 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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;

OF JOB_ID”
FROM EMPLOYEES
GROUP BY JOB_ID;

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

Clear my choice

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

Marked out of
1.00

Select one:
a. SELECT COUNT(DISTINCT MANAGER_ID) AS "NO. OF
MANAGER_ID" FROM EMPLOYEES;

FROM EMPLOYEES;

## c. SELECT COUNT *(DISTINCT MANAGER_ID) AS "NO. OF

MANAGER_ID" FROM EMPLOYEES;

## d. SELECT COUNT(DISTINCT MANAGER_ID) AS NO. OF

MANAGER_ID FROM EMPLOYEES;

Clear my choice
Question 39 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

## 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. 563.39

c. 500

d. 563.3

Clear my choice

Question 40
Not yet

Marked out of
1.00

## SELECT COUNT(PRICE) FROM STOCKS;

Question 41 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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

Clear my choice
Question 42 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

## 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. 0
0
0
0
0
0

c. 3
3
3
3
3

d. 0
0
0
0
0

Clear my choice
Question 43 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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

LENGTH(LASTNAME)
FROM EMPLOYEES

## d. SELECT LOWER(LASTNAME||','||FIRSTNAME) AS "COMPLETE

NAME",
LENGTH(LASTNAME)

FROM EMPLOYEES
WHERE LASTNAME LIKE 'M%';

Clear my choice
Question 44 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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

b. SELECT CONCAT(DEPARTMENT_ID,JOB_ID),MIN(SALARY),
MAX(SALARY)
FROM EMPLOYEES
GROUP BY DEPARTMENT_ID;

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

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

GROUP BY JOB_ID,DEPARTMENT_ID;

Clear my choice
Question 45 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

Which of the following is the correct query that displays the
maximum salary?

Select one:
a. SELECT COUNT (DISCTINCT MAX(SALARY)) FROM EMPLOYEES;

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

Clear my choice

Question 46 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
1.00

## Which of the following is the correct query that displays the

minimum lastname?

Select one:
a. SELECT COUNT (MIN(LASTNAME)) FROM EMPLOYEES;

## d. SELECT COUNT (DISCTINCT MIN(LASTNAME)) FROM

EMPLOYEES;

Clear my choice
Question 47 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

## Based on the given SELECT statement below what would be the

possible output?
FROM EMPLOYEES
WHERE SALARY BETWEEN 4000 AND 9000
LASTNAME LIKE ‘%S’;

Select one:
a. MOURGOS                      5800                5800@@@@
RAJS                                3500                3500@@@@
DAVIES                            3100                3100@@@@
MATOS                             2600                2600@@@@
VARGAS                           2500                2500@@@@
HIGGINS                          12000              12000@@@

## b. MOURGOS                      5800                5800

DAVIES                            3100                3100

## d. RAJS                               3500                3500

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

Clear my choice
Question 48

Not yet

Marked out of
 1.00

## SELECT MIN(PRICE) FROM STOCKS;

Question 49 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
1.00

## 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. ZLOYEY                          TRINA     80        200

## d. MOURGOS                      MOURGOS    50        100

Clear my choice
Question 50 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Marked out of
 1.00

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

## d. 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%';

Clear my choice

Stay in touch
AMA EDUCATION SYSTEM
 https://blended.amauonline.com/helpdesk