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 transcribedWhich of the following query is correct which will display the same output as shown below?

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

2.

image text in transcribed

Select one:

a. SELECT JOB_ID, COUNTDISTINCT(JOB_ID)"NO. OF JOB_ID", SUM(SALARY), AVG(SALARY)

FROM EMPLOYEES

GROUP BY JOB_ID;

b. SELECT JOB_ID, COUNT(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;

d. SELECT JOB_ID, COUNT*(JOB_ID)"NO. OF JOB_ID", SUM(SALARY), AVG(SALARY)

FROM EMPLOYEES

GROUP BY JOB_ID;

3. image text in transcribed

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;

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

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions