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

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

Table 1.0 EMPLOYEES

image text in transcribed

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

1.

image text in transcribed

Select one:

a. SELECT MAX(FIRSTNAME), MANAGER_ID, COUNT(SALARY), AVG(SALARY)

FROM EMPLOYEES

WHERE SALARY BETWEEN 6000 AND 10000

GROUP BY MANAGER_ID

HAVING (SALARY) >= 5000;

b. SELECT MAX(FIRSTNAME), MANAGER_ID, COUNT(SALARY), AVG(SALARY)

FROM EMPLOYEES

GROUP BY MANAGER_ID

WHERE SALARY BETWEEN 6000 AND 10000

HAVING MIN(SALARY) >= 5000;

c. SELECT MAX(FIRSTNAME), MANAGER_ID, COUNT(SALARY), AVG(SALARY)

FROM EMPLOYEES

WHERE SALARY BETWEEN 10000 AND 6000

GROUP BY MANAGER_ID

HAVING MIN(SALARY) >= 5000;

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

2.

image text in transcribed

Select one:

a. SELECT MIN(initcap(FIRSTNAME||' surnname is '||LASTNAME)) AS COMPLETE NAME, MIN(MANAGER_ID) AS "LOWEST MANAGER_ID" FROM EMPLOYEES;

b. SELECT MIN(LOWER(FIRSTNAME||' surnname is '||LASTNAME)) AS "COMPLETE NAME", MIN(MANAGER_ID) AS "LOWEST MANAGER_ID" FROM EMPLOYEES;

c. SELECT MIN(LOWER(FIRSTNAME||surnname is ||LASTNAME)) AS "COMPLETE NAME", MIN(MANAGER_ID) AS "LOWEST MANAGER_ID" FROM EMPLOYEES;

d. SELECT MIN(initcap(FIRSTNAME||' surnname is '||LASTNAME)) AS "COMPLETE NAME", MIN(MANAGER_ID) AS "LOWEST MANAGER_ID" FROM EMPLOYEES;

3.

image text in transcribed

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;

4.

image text in transcribed

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

5. image text in transcribed

Select one:

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

FROM EMPLOYEES

GROUP BY DEPARTMENT_ID

WHERE DEPARTMENT_ID IN(90,50)

HAVING MIN(DEPARTMENT_ID)

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

FROM EMPLOYEES

WHERE DEPARTMENT_ID NOT IN(90,50)

GROUP BY DEPARTMENT_ID

HAVING(DEPARTMENT_ID)

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

FROM EMPLOYEES

WHERE DEPARTMENT_ID IN(90,50)

HAVING MIN(DEPARTMENT_ID)

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

FROM EMPLOYEES

WHERE DEPARTMENT_ID IN(90,50)

GROUP BY DEPARTMENT_ID

HAVING MIN(DEPARTMENT_ID) EMPLOYEE ID FIRSTNAME LASTNAME JOB ID SALARY MANAGER ID DEPARTMENT ID 24000 17000 17000 90 90 90 100 STEVEN 101 NENA 102 LEX 03 ALEXANDER HUNOLD 104 BRUCE 107 DIANA 124 KEVIN 141 TRINA 142 CURTIS 43 RANDALLMATOS 144 PETER 149 ELENI 174 ELLEN 176 JONATHAN TAYLOR 78 KIMBERLEY GRANT 200 JENNIFER WHALEN AD ASST 201 MICHAELHARTSTEIN MK MAN 202 PAT 205 SHELLEYHIGGINS AC MGR 206 WILLIAM GIETZ KING KOCHAR E HAAN AD VP AD PRES AD VP 100 100 101 102 103 100 124 124 124 124 100 149 149 149 101 100 201 101 205 IT PROG IT PROG 6000 4200 5800 3500 3100 2600 2500 10500 11000 8600 7000 4400 13000 6000 12000 8300 ERNST LORENT2 IT PROG MOURGOS ST MAN RAJS DAVIES 50 ST CLERK ST CLERK ST CLERR ST CLERK 50 50 50 80 50 80 VARGAS LOTKEY SA MAN ABEL SA REP SA REP SA REP 10 20 20 110 110 FAY MK REP AC ACCOUNT

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

Know the three main dimensions of the service environment.

Answered: 1 week ago

Question

Understand the roles of signs, symbols, and artifacts.

Answered: 1 week ago

Question

Discuss the key ambient conditions and their effects on customers.

Answered: 1 week ago