5. EMP table has records as follows: EMP_NUM EMP_TITLE EMP UNAME Kolmvcz Lewis Vandam 100 101 102 103 104 105 106 107 108 109 110 111 112 113 Mr. Ms. 114 115 116 Mr. Ms. Mr. Mr. Mrs. Mr. Mr. Mr. Mrs. Mr. Mr. Ms. Jones Lance Williams Smith Diante Wiesenbach Ms. Mrs. Mr. Smith Genkazi Washington Johnson Smythe Brandon Saranda Smith EMP_FNAME EMP_INITIAL George Rhonda Rhett Anne John Robert Jeanine Joroe Paul M P D K D R K W E Edward E Melanie P Marie G Hermine R George Here, the last column EMP_MGR refer to the employee's manager, the value is the manager's EMP_NUM. Write a SQL statement to list full names (by concatenating EMP_FNAME and EMP_LNAME separated by a space) of employees AS 'Employee' with their managers' full name (again by concatenating EMP_FNAME and EMP_LNAME separated by a space) AS 'Manager' (Hint: recursive/self join and string concatenation). Output will look like: Employee Rhonda Lewis Rhett Vandam Anne Jones John Lange Jeanine Smith Jorge Diante George Smith Leiahla Genkazi Rupert Washington Edward Johnson Melanie Smythe Marie Brandon Hermine Saranda George Smith George Leichla Rupert D G Manager George Kolmvcz George Kolmvcz George Kolmvcz Robert Williams Robert Williams Robert Williams Paul Wiesenbach Paul Wiesenbach Robert Williams George Kolmvcz Robert Williams Paul Wiesenbach Robert Williams Paul Wiesenbach EMP_DOB 1942-06-15 00:00:00 1965-03-19 00:00:00 1958-11-14 00:00:00 1974-10-16 00:00:00 1971-11-08 00:00:00 1975-03-14 00:00:00 1968-02-12 00:00:00 1974-08-21 00:00:00 1966-02-14 00:00:00 1961-06-18 00:00:00 1970-05-19 00:00:00 1966-01-03 00:00:00 1961-05-14 00:00:00 1970-09-15 00:00:00 1956-11-02 00:00:00 1972-07-25 00:00:00 1955-11-08 00:00:00 EMP HIRE_DATE EMP AREACODE EMP_PHONE EMP_MGR 1985-03-15 00:00:00 615 1986-04-25 00:00:00 615 1990-12-20 00:00:00 901 1994-08-28 00:00:00 615 1994-10-20 00:00:00 901 1998-11-08 00:00:00 615 1989-01-05 00:00:00 615 1994-07-02 00:00:00 615 1992-11-18 00:00:00 615 1989-04-14 00:00:00 901 1990-12-01 00:00:00 901 1993-06-21 00:00:00 615 1983-12-01 00:00:00 615 1999-05-11 00:00:00 615 1979-11-15 00:00:00 901 1993-04-23 00:00:00 615 1988-12-10 00:00:00 615 324-5456 324-4472 675-8993 898-3456 504-4430 890-3220 324-7883 890-4567 897-4358 504-3339 569-0093 890-4925 898-4387 324-9006 882-0845 324-5505 890-2984 MALL 100 100 100 105 105 105 108 108 105 100 105 108 105 108

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section: Chapter Questions
Problem 4RA
icon
Related questions
Question
5. EMP table has records as follows:
EMP_NUM EMP_TITLE EMP_LNAME EMP_FNAME EMP_INITIAL
Kolmvcz
George
Lewis
Rhonda
Rhett
Vandam
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
Mr.
Ms.
Mr.
Ms.
Mr.
Mr.
Mrs.
Mr.
Mr.
Mr.
Mrs.
Mr.
Mr.
Ms.
Ms.
Mrs.
Mr.
Jones
Lande
Williams
Smith
Diante
Employee
Rhonda Lewis
Rhett Vandam
Jeanine
Jorae
Wiesenbach Paul
Smith
Genkazi
Washington
Johnson
Smythe
Brandon
Saranda
Smith
Anne
John
Robert
Anne Jones
John Lange
Jeanine Smith
Jorge Diante
George Smith
Leiahla Genkazi
Rupert Washington
Edward Johnson
Melanie Smythe
Marie Brandon
Hermine Saranda
George Smith
George
Leighla
Rupert
Edward
Melanie
Marie
Hermine
George
D
G
Manager
George Kolmvcz
George Kolmvcz
George Kolmvcz
Robert Williams
Robert Williams
Robert Williams
Paul Wiesenbach
Paul Wiesenbach
Robert Williams
George Kolmvcz
Robert Williams
Paul Wiesenbach
Robert Williams
Paul Wiesenbach
ZAOXO xx wwa.
M
P
D
K
D
R
K
W
E
E
P
G
R
EMP_DOB
1942-06-15 00:00:00
1965-03-19 00:00:00
1958-11-14 00:00:00
1974-10-16 00:00:00
1971-11-08 00:00:00
1975-03-14 00:00:00
1968-02-12 00:00:00
1974-08-21 00:00:00
1966-02-14 00:00:00
1961-06-18 00:00:00
1970-05-19 00:00:00
1966-01-03 00:00:00
1961-05-14 00:00:00
1970-09-15 00:00:00
1956-11-02 00:00:00
1972-07-25 00:00:00
1965-11-08 00:00:00
EMP_HIRE_DATE
1985-03-15 00:00:00
615
1986-04-25 00:00:00 615
1990-12-20 00:00:00 901
1994-08-28 00:00:00 615
1994-10-20 00:00:00 901
1998-11-08 00:00:00 615
1989-01-05 00:00:00 615
1994-07-02 00:00:00 615
1992-11-18 00:00:00 615
1989-04-14 00:00:00 901
1990-12-01 00:00:00 901
1993-06-21 00:00:00 615
1983-12-01 00:00:00 615
1999-05-11 00:00:00 615
1979-11-15 00:00:00 901
1993-04-23 00:00:00 615
1988-12-10 00:00:00 615
EMP_AREACODE
EMP PHONE EMP_MGR
324-5456
324-4472
675-8993
898-3456
504-4430
890-3220
324-7883
890-4567
897-4358
504-3339
569-0093
890-4925
898-4387
324-9006
882-0845
324-5505
890-2984
MILL
100
100
100
105
HULL
Here, the last column EMP_MGR refer to the employee's manager, the value is the manager's EMP_NUM.
Write a SQL statement to list full names (by concatenating EMP_FNAME and EMP_LNAME separated by
a space) of employees AS 'Employee' with their managers' full name (again by concatenating
EMP_FNAME and EMP_LNAME separated by a space) AS 'Manager' (Hint: recursive/self join and string
concatenation).
Output will look like:
105
105
HULL
108
108
105
100
105
108
105
108
Transcribed Image Text:5. EMP table has records as follows: EMP_NUM EMP_TITLE EMP_LNAME EMP_FNAME EMP_INITIAL Kolmvcz George Lewis Rhonda Rhett Vandam 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 Mr. Ms. Mr. Ms. Mr. Mr. Mrs. Mr. Mr. Mr. Mrs. Mr. Mr. Ms. Ms. Mrs. Mr. Jones Lande Williams Smith Diante Employee Rhonda Lewis Rhett Vandam Jeanine Jorae Wiesenbach Paul Smith Genkazi Washington Johnson Smythe Brandon Saranda Smith Anne John Robert Anne Jones John Lange Jeanine Smith Jorge Diante George Smith Leiahla Genkazi Rupert Washington Edward Johnson Melanie Smythe Marie Brandon Hermine Saranda George Smith George Leighla Rupert Edward Melanie Marie Hermine George D G Manager George Kolmvcz George Kolmvcz George Kolmvcz Robert Williams Robert Williams Robert Williams Paul Wiesenbach Paul Wiesenbach Robert Williams George Kolmvcz Robert Williams Paul Wiesenbach Robert Williams Paul Wiesenbach ZAOXO xx wwa. M P D K D R K W E E P G R EMP_DOB 1942-06-15 00:00:00 1965-03-19 00:00:00 1958-11-14 00:00:00 1974-10-16 00:00:00 1971-11-08 00:00:00 1975-03-14 00:00:00 1968-02-12 00:00:00 1974-08-21 00:00:00 1966-02-14 00:00:00 1961-06-18 00:00:00 1970-05-19 00:00:00 1966-01-03 00:00:00 1961-05-14 00:00:00 1970-09-15 00:00:00 1956-11-02 00:00:00 1972-07-25 00:00:00 1965-11-08 00:00:00 EMP_HIRE_DATE 1985-03-15 00:00:00 615 1986-04-25 00:00:00 615 1990-12-20 00:00:00 901 1994-08-28 00:00:00 615 1994-10-20 00:00:00 901 1998-11-08 00:00:00 615 1989-01-05 00:00:00 615 1994-07-02 00:00:00 615 1992-11-18 00:00:00 615 1989-04-14 00:00:00 901 1990-12-01 00:00:00 901 1993-06-21 00:00:00 615 1983-12-01 00:00:00 615 1999-05-11 00:00:00 615 1979-11-15 00:00:00 901 1993-04-23 00:00:00 615 1988-12-10 00:00:00 615 EMP_AREACODE EMP PHONE EMP_MGR 324-5456 324-4472 675-8993 898-3456 504-4430 890-3220 324-7883 890-4567 897-4358 504-3339 569-0093 890-4925 898-4387 324-9006 882-0845 324-5505 890-2984 MILL 100 100 100 105 HULL Here, the last column EMP_MGR refer to the employee's manager, the value is the manager's EMP_NUM. Write a SQL statement to list full names (by concatenating EMP_FNAME and EMP_LNAME separated by a space) of employees AS 'Employee' with their managers' full name (again by concatenating EMP_FNAME and EMP_LNAME separated by a space) AS 'Manager' (Hint: recursive/self join and string concatenation). Output will look like: 105 105 HULL 108 108 105 100 105 108 105 108
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L