不知道这里发生了什么......我知道这与 max 和 group by 语句有关......非常感谢任何帮助!
select
c_clm as ClaimNo,
i_pol as Policy,
d_rcv_clm as Received,
c_sta_clm as Status,
d_tmn_clm as Terminated,
c_tmn_clm as Reason,
MAX(pym.d_rls_pym) as Payment,
c_sgm as Segment
from ltc_p.VLTC_CLM_WK clm
left join pearl_p.TLTC915_PYM pym on
clm.i_sys_clm = pym.i_sys_clm
where c_sgm = 'am'
group by 1,2,3,4,5,6,7,8