Write a query to display the current salary for each employee in department 300. Assume that only current employees are kept in the system, and therefore the most current salary for each employee is the entry in the salary history with a NULL end date. Sort the output in descending order by salary amount figure48 EMP_NUM EMP_LNAME EMP_FNAME SAL_AMOUNT 83695 MENDEZ CARROLL 79200 83716 RIVERA HENRY 85920 84594 TIDWELL ODELL 77400 83910 AVERY LAUREN 76110 83359 WATTS MERLE 72240 84500 WESTON CHRISTINE 78690 84328 CARPENTER FERN 94090 84432 JAMISON MERLE 85360 83902 VARGAS ROCKY 79540 83746 RANKIN SEAN 95550 83790 ACEVEDO LAVINA 72000 figure42 EPT_NUM DEPT_NAME DEPT_PHONE EMP_NUM EMP_LNAME 300 PURCHASING 555-4873 83746 RANKIN 200 SALES 555-2824 83509 STOVER 400 WAREHOUSE 555-1003 83759 CHARLES 600 ACCOUNTING 555-2333 84583 YAZZIE 550 TRUCKING 555-0057 83683 STONE 500 DISTRIBUTION 555-3624 84052 FORD 280 MARKETING 555-8500 84042 PETTIT   figure31 EMP_NUM EMP_LNAME EMP_FNAME SAL_FROM SAL_END SAL_AMOUNT 84039 COLEMAN HANNAH 27-Jun-2019 26-Jun-2020 51170 83745 SPICER DWAIN 02-Aug-2018 01-Aug-2019 68550 83745 SPICER DWAIN 01-Aug-2019 31-Jul-2020 71980 83745 SPICER DWAIN 03-Aug-2017 01-Aug-2018 63470 83745 SPICER DWAIN 01-Aug-2020 01-Aug-2021 74140 83731 VARGAS SHERON 15-Jul-2019 14-Jul-2020 43740 83745 SPICER DWAIN 02-Aug-2015 01-Aug-2016 56020 84039 COLEMAN HANNAH 28-Jun-2018 27-Jun-2019 47380 84039 COLEMAN HANNAH 28-Jun-2021 - 54280 83731 VARGAS SHERON 14-Jul-2020 14-Jul-2021 49550 83745 SPICER DWAIN 02-Aug-2016 02-Aug-2017 57700 84039 COLEMAN HANNAH 27-Jun-2020 27-Jun-2021 52700 83731 VARGAS SHERON 14-Jul-2019 13-Jul-2020 48110 83745 SPICER DWAIN 02-Aug-2021: 76360 83731 VARGAS SHERON 15-Jul-2021 - 51040 table used are: figure48, figure42, and figure31

Database Systems: Design, Implementation, & Management
11th Edition
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Chapter8: Advanced Sql
Section: Chapter Questions
Problem 20P
icon
Related questions
Question

48.Write a query to display the current salary for each employee in department 300. Assume that only current employees are kept in the system, and therefore the most current salary for each employee is the entry in the salary history with a NULL end date. Sort the output in descending order by salary amount


figure48
EMP_NUM EMP_LNAME EMP_FNAME SAL_AMOUNT
83695 MENDEZ CARROLL 79200
83716 RIVERA HENRY 85920
84594 TIDWELL ODELL 77400
83910 AVERY LAUREN 76110
83359 WATTS MERLE 72240
84500 WESTON CHRISTINE 78690
84328 CARPENTER FERN 94090
84432 JAMISON MERLE 85360
83902 VARGAS ROCKY 79540
83746 RANKIN SEAN 95550
83790 ACEVEDO LAVINA 72000

figure42
EPT_NUM DEPT_NAME DEPT_PHONE EMP_NUM EMP_LNAME
300 PURCHASING 555-4873 83746 RANKIN
200 SALES 555-2824 83509 STOVER
400 WAREHOUSE 555-1003 83759 CHARLES
600 ACCOUNTING 555-2333 84583 YAZZIE
550 TRUCKING 555-0057 83683 STONE
500 DISTRIBUTION 555-3624 84052 FORD
280 MARKETING 555-8500 84042 PETTIT

 

figure31
EMP_NUM EMP_LNAME EMP_FNAME SAL_FROM SAL_END SAL_AMOUNT
84039 COLEMAN HANNAH 27-Jun-2019 26-Jun-2020 51170
83745 SPICER DWAIN 02-Aug-2018 01-Aug-2019 68550
83745 SPICER DWAIN 01-Aug-2019 31-Jul-2020 71980
83745 SPICER DWAIN 03-Aug-2017 01-Aug-2018 63470
83745 SPICER DWAIN 01-Aug-2020 01-Aug-2021 74140
83731 VARGAS SHERON 15-Jul-2019 14-Jul-2020 43740
83745 SPICER DWAIN 02-Aug-2015 01-Aug-2016 56020
84039 COLEMAN HANNAH 28-Jun-2018 27-Jun-2019 47380
84039 COLEMAN HANNAH 28-Jun-2021 - 54280
83731 VARGAS SHERON 14-Jul-2020 14-Jul-2021 49550
83745 SPICER DWAIN 02-Aug-2016 02-Aug-2017 57700
84039 COLEMAN HANNAH 27-Jun-2020 27-Jun-2021 52700
83731 VARGAS SHERON 14-Jul-2019 13-Jul-2020 48110
83745 SPICER DWAIN 02-Aug-2021: 76360
83731 VARGAS SHERON 15-Jul-2021 - 51040

table used are: figure48, figure42, and figure31

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Single 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.
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
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