Skip to content

Commit

Permalink
Merge pull request #196 from MITLibraries/HRQB-20-termination-reasons
Browse files Browse the repository at this point in the history
HRQB 20 - Termination Reasons
  • Loading branch information
ghukill authored Oct 7, 2024
2 parents 7d05dfa + 106f44f commit 3406d46
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hrqb/tasks/sql/employees.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CHANGELOG
- 2024-05-13 Query created and added
- 2024-07-09 Added CTEs to gather last appointment transaction, to get termination
or retirement reason
- 2024-10-07 Use table HR_APPT_ACTION_DETAIL vs HR_APPT_TX_DETAIL for termination
details
*/

with ordered_appt_txn as (
Expand All @@ -16,7 +18,7 @@ with ordered_appt_txn as (
partition by a.MIT_ID
order by a.APPT_TX_BEGIN_DATE desc, a.APPT_TX_END_DATE desc
) as txn_row_num
from HR_APPT_TX_DETAIL a
from HR_APPT_ACTION_DETAIL a
left join HR_PERSONNEL_ACTION_TYPE at on at.HR_PERSONNEL_ACTION_TYPE_KEY = a.HR_PERSONNEL_ACTION_TYPE_KEY
where at.HR_PERSONNEL_ACTION in ('Termination','Retirement')
),
Expand Down

0 comments on commit 3406d46

Please sign in to comment.