diff --git a/ecs/jskult-batch/src/batch/mst_inst_all.py b/ecs/jskult-batch/src/batch/mst_inst_all.py index 96a9e7d2..c5b99021 100644 --- a/ecs/jskult-batch/src/batch/mst_inst_all.py +++ b/ecs/jskult-batch/src/batch/mst_inst_all.py @@ -348,7 +348,7 @@ class MstInstAll(JskultBatchEntrypoint): SELECT mim.inst_cd, MAX(mim.eff_end_ym) AS max_end_ym FROM src07.mst_inst_merck AS mim GROUP BY mim.inst_cd - ) AS mim_max_end_ym + ) AS mim_max_end_ym ON mim.inst_cd = mim_max_end_ym.inst_cd AND mim.eff_end_ym = mim_max_end_ym.max_end_ym LEFT OUTER JOIN src07.mst_jis_pref AS mjp