Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Direction: Use the Employees table (copy and paste the code in SQL command line) Based on the given table: Employees table as shown below, write

Direction:

Use the Employees table (copy and paste the code in SQL command line)

Based on the given table: Employees table as shown below, write the PL/SQL that applies single row function in order to get the printed output per number. Write your answer in a short bond paper.

CREATE TABLE EMPLOYEES( EMPLOYEE_ID NUMBER(3) PRIMARY KEY, FIRSTNAME VARCHAR(10), LASTNAME VARCHAR(10)NOT NULL, JOB_ID VARCHAR(10), SALARY NUMBER(8,2), MANAGER_ID NUMBER(6), DEPARTMENT_ID NUMBER(4)); INSERT INTO EMPLOYEES VALUES (100,'STEVEN','KING','AD_PRES',24000,NULL,90); INSERT INTO EMPLOYEES VALUES (101,'NENA','KOCHAR','AD_VP',17000,100,90); INSERT INTO EMPLOYEES VALUES (102,'LEX','DE HAAN','AD_VP',17000,100,90); INSERT INTO EMPLOYEES VALUES (103,'ALEXANDER','HUNOLD','IT_PROG',NULL,101,60); INSERT INTO EMPLOYEES VALUES (104,'BRUCE','ERNST','IT_PROG',6000,102,60); INSERT INTO EMPLOYEES VALUES (107,'DIANA','LORENTZ','IT_PROG',4200,103,60); INSERT INTO EMPLOYEES VALUES (124,'KEVIN','MOURGOS','ST_MAN',5800,100,50); INSERT INTO EMPLOYEES VALUES (141,'TRINA','RAJS','ST_CLERK',3500,124,50); INSERT INTO EMPLOYEES VALUES (142,'CURTIS','DAVIES','ST_CLERK',3100,124,50); INSERT INTO EMPLOYEES VALUES (143,'RANDALL','MATOS','ST_CLERK',2600,124,50); INSERT INTO EMPLOYEES VALUES (144,'PETER','VARGAS','ST_CLERK',2500,124,50); INSERT INTO EMPLOYEES VALUES (149,'ELENI','ZLOTKEY','SA_MAN',10500,100,80); INSERT INTO EMPLOYEES VALUES (174,'ELLEN','ABEL','SA_REP',11000,149,50); INSERT INTO EMPLOYEES VALUES (176,'JONATHAN','TAYLOR','SA_REP',8600,149,80); INSERT INTO EMPLOYEES VALUES (178,'KIMBERLEY','GRANT','SA_REP',7000,149,NULL); INSERT INTO EMPLOYEES VALUES (200, 'JENNIFER','WHALEN','AD_ASST',4400,101,10); INSERT INTO EMPLOYEES VALUES (201,'MICHAEL','HARTSTEIN','MK_MAN',13000,100,20); INSERT INTO EMPLOYEES VALUES (202,'PAT','FAY','MK_REP',6000,201,20); INSERT INTO EMPLOYEES VALUES (205,'SHELLEY','HIGGINS','AC_MGR',12000,101,110); INSERT INTO EMPLOYEES VALUES (206,'WILLIAM','GIETZ','AC_ACCOUNT',8300,205,110);

image text in transcribed

can somebody help me with this question...thank you

Font Paragraph Styles 11. Create a query that display the maximum lastname concatenated to firstname and rename the column as "Employees Name", Job id and apply the ff. functions: Count for the distinct 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 that 10000. Possible Output Employees Name JOB ID COUNT (JOB ID) JOB ID 1 AD VP 1 MK MAN AD VP De Haan, Lex Hartstein,Michael MK MAN (Ctrl)

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

=+ At what rate does capital per person grow?

Answered: 1 week ago