Database Management System LAB Final Q2
Database Management System LAB Final Q2
Michelle M. Esperal
FINAL LAB QUIZ 2
Completed on Tuesday, 8 August 2023, 7:16 PM
Marks 16.00/20.00
Question 1
Question text
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.
Question 1Select one:
a.
SELECT MIN(FIRSTNAME||LASTNAME)
FROM EMPLOYEES
GROUP BY DEPARTMENT_ID
HAVING MAX(SALARY);
b.
SELECT MIN(FIRSTNAME||LASTNAME)
FROM EMPLOYEES
HAVING MAX(SALARY)<10000
GROUP BY DEPARTMENT_ID;
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;
Question 2
Incorrect
Question text
Which of the following query is correct which will display the same output as shown below?
b.
c.
d.
Which of the following is the correct that display distinct job_id and the the total number
per distinct (unique) job_id.
Question 3Select one:
a.
b.
c.
Which of the following is the correct query that displays the maximum salary?
Question 4Select one:
a.
b.
c.
a.
b.
c.
d.
Select one:
a.
b.
c.
d.
Question text
Which of the following query is correct which will display the same output as shown below?
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%';
Question 8
Incorrect
Question text
Which of the following query is correct which will display the same output as shown below?
a.
b.
c.
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.
a.
c.
d.
Select one:
a.
SELECT MAX(LASTNAME||FIRSTNAME) AS NAME, MAX(SALARY)
FROM EMPLOYEES;
b.
c.
d.
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.
b.
c.
d.
Select one:
a.
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;
b.
c.
d.
Question text
Which of the following query is correct which will display the same output as shown below?
Select one:
a.
b.
c.
d.
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.
b.
c.
d.
SELECT MIN(SALARY) AS “LOWEST SALARY”, LOWER(JOB_ID)
FROM EMPLOYEES
GROUP BY JOB_ID;
Question 15
Question text
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.
b.
d.
Select one:
a.
b.
c.
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.
b.
d.
Which of the following is the correct query that displays the minimum lastname?
Select one:
a.
c.
d.
Select one:
a.
b.
d.
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.
b.
c.
d.