Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Table 1.0 EMPLOYEES

image text in transcribed

1.

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

WHERE JOB_ID NOT LIKE %REP%

GROUP BY JOB_ID

HAVING MAX(SALARY)>500;

b. SELECT MIN(LASTNAME), AVG(SALARY)

FROM EMPLOYEES

GROUP BY JOB_ID

WHERE JOB_ID LIKE %REP%

HAVING MAX(SALARY)>500;

c. SELECT MIN(LASTNAME), AVG(SALARY)

FROM EMPLOYEES

WHERE JOB_ID LIKE %REP%

GROUP BY JOB_ID

HAVING MAX(SALARY)>500;

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

FROM EMPLOYEES

GROUP BY JOB_ID;

2.

Which of the following is the correct query that displays the minimum lastname?

Select one:

a. SELECT COUNT (DISCTINCT MIN(LASTNAME)) FROM EMPLOYEES;

b. SELECT MIN LASTNAME FROM EMPLOYEES;

c. SELECT MIN(LASTNAME) FROM EMPLOYEES;

d. SELECT COUNT (MIN(LASTNAME)) FROM EMPLOYEES;

3.

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,DEPARTMENT_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

GROUP BY JOB_ID;

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

FROM EMPLOYEES;

4.

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

GROUP BY JOB_ID

WHERE LASTNAME LIKE '%N'

HAVING AVG(SALARY)>10000;

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

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;

5.

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

Select one:

a. SELECT MAX(SALARY) FROM EMPLOYEES;

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

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

d. SELECT MAX SALARY FROM EMPLOYEES;

D-00000000000000 12211 1 0012304 444, 0 9 9 910115 00000022220444, 00000 Y-000 -477 211 02851655060?0003 64, 5 3 3 2 2 0 1874 3628 PPPs PRC CLARE RE AS A RE MG AC PPPM JO | ADAT IT IT ST ST ST ST SA SA SA SA MK MK AC AC 11- ?s ES 9 HERE E AM IN R N E E LA MB NCTEL TEI I-T F-S BD PEEJK MPSW D-01 2 3 4 7 4 1 2 3 4 946801256 1-00000024. 4 44 7 7 7 OOOOO

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

What Is A Database And How Do I Use It

Authors: Matt Anniss

1st Edition

1622750799, 978-1622750795

More Books

Students also viewed these Databases questions

Question

=+What is the nature of the unions in the particular country?

Answered: 1 week ago