Dbms - Finals - 42.pdf

  • Uploaded by: jikjik
  • 0
  • 0
  • March 2021
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Dbms - Finals - 42.pdf as PDF for free.

More details

  • Words: 4,183
  • Pages: 33
Loading documents preview...
 

Home

My courses

CS-350-LEC-1913T

Week 14: Final Exam

Finals

  

Question 1 Not yet answered Marked out of 1.00

This is use to return one result per row. Select one: a. Single row b. Multiple row



c. Dual table



d. Number function Clear my choice

Question 2 Not yet answered Marked 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 b. 563.39 c. 500 d. 563.3 Clear my choice

Question 3 Not yet answered



Marked 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. Dual b. Authors c. Parts



d. Employees



Clear my choice

 

Question 4 Not yet answered



Marked out of 1.00

SELECT COUNT(*) FROM STOCKS; Answer:

9

Question 5 Not yet answered



Marked out of 1.00

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

b. SELECT MIN(LASTNAME), AVG(SALARY) 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;

d. SELECT MIN(LASTNAME), AVG(SALARY) FROM EMPLOYEES WHERE JOB_ID LIKE ‘%REP%’ GROUP BY JOB_ID HAVING MAX(SALARY)>500;

Clear my choice

Question 6 Not yet answered



Which of the following query is correct which will display the 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 Not yet answered



Marked out of

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

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 Not yet answered



Marked out of

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

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 Not yet answered



Which of the following query is correct which will display the 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

Question 10 Not yet answered Marked out of 1.00

Trims leading or trailing characters (or both) from a character string. Select one: a. Trim b. SUBSTR c. INSTR d. Length Clear my choice

Question 11 Not yet answered



Marked out of

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

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: a. SELECT LPAD(SALARY,15,'@'), RPAD(SALARY,10,'$') FROM EMPLOYEES WHERE EMPLOYEE_ID IN (201,176,144);

b. SELECT LPAD(SALARY,15,'$'), RPAD(SALARY,10,'@') FROM EMPLOYEES WHERE EMPLOYEE_ID IN (201,176,144);

c. SELECT LPAD(SALARY,15,'$'), RPAD(SALARY,10,'@') FROM EMPLOYEES WHERE EMPLOYEE_ID = (201,176,144);

d. SELECT RPAD(SALARY,15,'$'), LPAD(SALARY,10,'@') FROM EMPLOYEES WHERE EMPLOYEE_ID IN (201,176,144);

Clear my choice

Question 12 Not yet answered



Marked out of

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

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 ORDER BY SALARY DESC;

d. SELECT (FIRSTNAME||' EARNS '|| SALARY || 'MONTHLY BUT WANTS' || SALARY * 3) AS "DREAM SALARIES" FROM EMPLOYEES ORDER BY SALARY;

Clear my choice

Question 13 Not yet answered



Which of the following query is correct which will display the 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;

d. SELECT MIN(LASTNAME), JOB_ID, MAX(SALARY) FROM EMPLOYEES WHERE JOB_ID LIKE '%REP%' GROUP BY JOB_ID;

Clear my choice

Question 14 Not yet answered Marked out of 1.00

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

1

Question 15 Not yet answered



Marked out of

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

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 Not yet answered Marked 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. lowercase b. Upper case c. INITCAT d. Sentence case Clear my choice

Question 17 Not yet answered



Marked 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. Character function c. Number function



d. Case manipulation function



Clear my choice

 

Question 18 Not yet answered



Extracts a string of determined length.

Marked out of 1.00

Select one: a. SUBSTR b. Length c. INSTR d. Trim Clear my choice

Question 19 Not yet answered Marked out of 1.00

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

8.22

Question 20 Not yet answered



Marked out of

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

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 Not yet answered



Which of the following query is correct which will display the 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 answered Marked out of 1.00

SELECT COUNT(DISTINCT QTY) FROM STOCKS; Answer:

Question 23 Not yet answered Marked out of 1.00

5

This is use to return one result per group of row. Select one: a. Number function b. Dual table c. Single row d. Multiple row Clear my choice

Question 24 Not yet answered



Marked out of

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

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 Not yet answered



Marked out of

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

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 answered Marked out of 1.00

SELECT MAX(NAME) FROM STOCKS; Answer:

Zonrox

Question 27 Not yet answered



Which of the following query is correct which will display the 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;

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

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 Not yet answered



Marked out of

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

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 OR SALARY BETWEEN 4000 OR 6000;

b. SELECT (FIRSTNAME||(SALARY,6,'*')) AS "EMPLOYEES AND THEIR 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 OR SALARY BETWEEN 4000 AND 6000;

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

Clear my choice

Question 29 Not yet answered



Marked out of

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

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 Not yet answered



Marked out of

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

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

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

Clear my choice

Question 31

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

Not yet answered Marked out of 1.00

Select one: a. Multiple row function b. Character function c. Number function d. Case manipulation function Clear my choice

Question 32 Not yet answered



Marked out of

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

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 Not yet answered



Marked out of

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

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 Not yet answered

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

Marked out of 1.00

  Select one: a. SELECT COUNT(*) FROM EMPLOYEES; b. SELECT * FROM EMPLOYEES; c. SELECT COUNT ALL FROM EMPLOYEES; Clear my choice

Question 35 Not yet answered



Marked out of

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

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 Not yet answered Marked out of 1.00

What is the return value if the user try to do the following: SELECT TRUNC (65.73,-2) FROM DUAL; Select one: a. 60 b. 0 c. 600 d. 00 Clear my choice

Question 37 Not yet answered



Marked out of

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

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;

b. SELECT DISTICT(JOB_ID), COUNT(JOB_ID) AS “TOTAL NUMBER 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 Not yet answered

Which of the following query is correct which will display the 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; b. SELECT COUNT(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(DISTINCT MANAGER_ID) AS NO. OF MANAGER_ID FROM EMPLOYEES; Clear my choice

Question 39 Not yet answered



Marked out of

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

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 answered Marked out of 1.00

SELECT COUNT(PRICE) FROM STOCKS; Answer:

9

Question 41 Not yet answered



Marked out of

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

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 Not yet answered



Marked out of

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

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 Not yet answered



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

Clear my choice

Question 44 Not yet answered



Marked out of

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

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 Not yet answered



Marked out of 1.00

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 COUNT (DISCTINCT MAX(SALARY)) FROM EMPLOYEES; b. SELECT MAX SALARY FROM EMPLOYEES; c. SELECT MAX(SALARY) FROM EMPLOYEES; d. SELECT COUNT (MAX(SALARY)) FROM EMPLOYEES; Clear my choice

Question 46 Not yet answered Marked out of

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

1.00

Which of the following is the correct query that displays the minimum lastname? Select one: a. SELECT COUNT (MIN(LASTNAME)) FROM EMPLOYEES; b. SELECT MIN LASTNAME FROM EMPLOYEES; c. SELECT MIN(LASTNAME) FROM EMPLOYEES; d. SELECT COUNT (DISCTINCT MIN(LASTNAME)) FROM EMPLOYEES; Clear my choice

Question 47 Not yet answered



Marked 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,SALARY, RPAD(SALARY,4,’@’) 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 c. MOURGOS                      5800                5800@@@@ d. RAJS                               3500                3500 DAVIES                           3100                3100 MATOS                            2600                2600 VARGAS                          2500                2500 HIGGINS                        12000              12000 e. MOURGOS                      5800                5800 Clear my choice

Question 48 Not yet answered



Marked out of 1.00

    

SELECT MIN(PRICE) FROM STOCKS;



Answer:

Question 49 Not yet answered Marked out of

7

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

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 b. ZLOTKEY                       ZLOTKEY     80        100 c. RAJS                                 RAJS               50        124 d. MOURGOS                      MOURGOS    50        100 Clear my choice

Question 50 Not yet answered



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

Related Documents

Dbms - Finals - 42.pdf
March 2021 0
Dbms
January 2021 3
Finals
January 2021 2
Dbms Mcq
January 2021 2
Geo101-finals
February 2021 2

More Documents from "Michael Gordillo"

Dbms - Finals - 42.pdf
March 2021 0