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 (Figure P7.48). 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 figure47 EMP_FNAME EMP_LNAME CUST_NAME CUST_LNAME INV_DATE INV_TOTAL John Doe Customer 1 Doe 01-May-2022 100 tables being used are: figure47 and figure48
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 (Figure P7.48). 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 figure47 EMP_FNAME EMP_LNAME CUST_NAME CUST_LNAME INV_DATE INV_TOTAL John Doe Customer 1 Doe 01-May-2022 100 tables being used are: figure47 and figure48
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
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 (Figure P7.48).
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 |
figure47
EMP_FNAME | EMP_LNAME | CUST_NAME | CUST_LNAME | INV_DATE | INV_TOTAL |
---|---|---|---|---|---|
John | Doe | Customer 1 | Doe | 01-May-2022 | 100 |
tables being used are: figure47 and figure48
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps
Knowledge Booster
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…
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…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
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…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning