select clm.c_clm,clm.c_loc
from
(select *
from pearl_p.TLTC900_CLM clm) as cl
left join
(select
max(av.d_usr_udt_lst)
from pearl_p.TLTC913_AVY av
group by 1) as avy
on cl.i_sys_clm = avy.i_sys_clm
select clm.c_clm,clm.c_loc
from
(select *
from pearl_p.TLTC900_CLM clm) as cl
left join
(select
max(av.d_usr_udt_lst) as "MaxThing"
from pearl_p.TLTC913_AVY av
group by 1) as avy
on cl.i_sys_clm = avy.i_sys_clm