In The SQL Oracle Application Using the UNION operator, write a query that displays the employee_id, job_id, and salary of ALL present and past employees. If a salary is not found, then just display a 0 (zero) in its place.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

In The SQL Oracle Application

Using the UNION operator, write a query that displays the employee_id, job_id, and salary of ALL present and past employees. If a salary is not found, then just display a 0 (zero) in its place.

TB_JOB_HISTORY
EMPLOYEE ID
START DATE
END DATE
JOB_ID
DEPARTMENT_ID
3/24/2006
12/31/2007
ST CLERK
мк МAN
114
50
112
1/15/2000
1/15/2010
MK_MAN
AD ASST
20
1/15/2009
12/31/2011
12/31/2010
8/18/2006
6/10/2006
1/5/2000
115
10
111
MK REP
20
116
2/10/2001
ST CLERK
50
5/6/2002
7/15/2006
113
AD ASST
10
117
12/31/2015
AP MAN
30
1/15/2000
1/15/2000
118
8/5/2007
MR REP
40
8/15/2010
12/31/2007
119
MR REP
40
120
1/5/2003
AP MAN
30
TB EMPLOYEES
EMP_ID
LASTNAME
FIRSTNAME
EMAIL
PHONE_NUMBER
HIRE DATE
JOB ID
SALARY
COMMISSION PCT
MNGR_ID
ST CLERK
MK_MAN
AD ASST
мK REP
114
TALAG
JOY
italag@gmailLcom
745-65-52
3/25/2006
16975.85
0.5
113
112
BERMUDEL
RUDY
rbermudel@gmail.com
152-52-56
1/15/2000
15000.95
0.5
111
115
ASIS
ROLLY
rasis@gmail.com
458-96-54
6/15/2006
30257.95
0.2
111
111
SEVILLA
MARIE
msevilla@gmail.com
851-84-32
1/10/2000
35741.95
0.2
116
HERRERA
ETHEL
eherrera@gmail.com
741-52-01
2/10/2001
ST_CLERK
50743,52
0.3
113
DE LOS SANTOS
edelossantos@gmail.com
mgruyal@gmail.com
5/10/2002
7/20/2006
113
ERIC
952-41-85
AD_ASST
25984.75
0.3
117
GRUYAL
MARVIN
365-45-85
AP_MAN
26415.65
0.2
113
118
PAULE
BALLERIE
bpaule@gmail.com
958-42-25
1/15/2000
MR_REP
85213.25
0.5
111
RIEGO
MARICAR
854-85-32
1/15/2000
MR_REP
АР MAN
119
mrieg@gmail.com
95145.95
0.3
111
120
SICAT
MILET
msicat@gmail.com
965-41-03
1/10/2003
84652.8
0.2
113
Transcribed Image Text:TB_JOB_HISTORY EMPLOYEE ID START DATE END DATE JOB_ID DEPARTMENT_ID 3/24/2006 12/31/2007 ST CLERK мк МAN 114 50 112 1/15/2000 1/15/2010 MK_MAN AD ASST 20 1/15/2009 12/31/2011 12/31/2010 8/18/2006 6/10/2006 1/5/2000 115 10 111 MK REP 20 116 2/10/2001 ST CLERK 50 5/6/2002 7/15/2006 113 AD ASST 10 117 12/31/2015 AP MAN 30 1/15/2000 1/15/2000 118 8/5/2007 MR REP 40 8/15/2010 12/31/2007 119 MR REP 40 120 1/5/2003 AP MAN 30 TB EMPLOYEES EMP_ID LASTNAME FIRSTNAME EMAIL PHONE_NUMBER HIRE DATE JOB ID SALARY COMMISSION PCT MNGR_ID ST CLERK MK_MAN AD ASST мK REP 114 TALAG JOY italag@gmailLcom 745-65-52 3/25/2006 16975.85 0.5 113 112 BERMUDEL RUDY rbermudel@gmail.com 152-52-56 1/15/2000 15000.95 0.5 111 115 ASIS ROLLY rasis@gmail.com 458-96-54 6/15/2006 30257.95 0.2 111 111 SEVILLA MARIE msevilla@gmail.com 851-84-32 1/10/2000 35741.95 0.2 116 HERRERA ETHEL eherrera@gmail.com 741-52-01 2/10/2001 ST_CLERK 50743,52 0.3 113 DE LOS SANTOS edelossantos@gmail.com mgruyal@gmail.com 5/10/2002 7/20/2006 113 ERIC 952-41-85 AD_ASST 25984.75 0.3 117 GRUYAL MARVIN 365-45-85 AP_MAN 26415.65 0.2 113 118 PAULE BALLERIE bpaule@gmail.com 958-42-25 1/15/2000 MR_REP 85213.25 0.5 111 RIEGO MARICAR 854-85-32 1/15/2000 MR_REP АР MAN 119 mrieg@gmail.com 95145.95 0.3 111 120 SICAT MILET msicat@gmail.com 965-41-03 1/10/2003 84652.8 0.2 113
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Query Syntax
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education