DBMS - Quiz 006 - 9 PDF

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

Home My courses CS-350-LEC-1913T Week 13: Short Quiz Quiz 006



Question 1 Which of the following query is correct which will display the
 Answer saved same output as shown below?
Marked out of
 1.00

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

Clear my choice
Question 2 Choose the letter of the correct answer based on the table
Not yet EMPLOYEES as shown below.
answered
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;

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;

Clear my choice

Question 3

Answer saved

Marked out of
1.00

SELECT COUNT(*) FROM STOCKS;

Answer: 9
Question 4
Answer saved

Marked out of
1.00

SELECT COUNT(DISTINCT QTY) FROM STOCKS;


 Answer: 5

Question 5
Answer saved

Marked out of
1.00

SELECT MIN(ID) FROM STOCKS;

Answer: 1
Question 6 Choose the letter of the correct answer based on the table
Answer saved EMPLOYEES as shown below.
Marked out of 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
GROUP BY DEPARTMENT_ID

HAVING MAX(SALARY);

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)<10000;

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

HAVING MAX(SALARY)<10000
GROUP BY DEPARTMENT_ID;

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


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;

Clear my choice

Question 8 Which of the following query is correct which will display the
Answer saved same output as shown below?
Marked out of
1.00

Select one:
a. SELECT COUNT(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(DISTINCT MANAGER_ID) AS "NO. OF


MANAGER_ID" FROM EMPLOYEES;

Clear my choice
Question 9 Choose the letter of the correct answer based on the table
Answer saved EMPLOYEES as shown below.
Marked out of
Table 1.0 EMPLOYEES
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;

b. SELECT MAX SALARY FROM EMPLOYEES;

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

d. SELECT MAX(SALARY) FROM EMPLOYEES;

Clear my choice

Question 10 Which of the following query is correct which will display the
Answer saved same output as shown below?
Marked out of
1.00

Select one:
a. SELECT MIN(LASTNAME), MIN(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), 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

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

You might also like