CREATE OR REPLACE VIEW public.vw_lotes_morosidad_1109 AS 
SELECT 
    lot.*, 
    liq.inm_ficha, 
    liq.inm_ctacatastral, 
    liq.trb_total_deuda, 
    liq.trb_total_pago, 
    liq.ultimo_pago 
FROM public.e1109_lotes_activos lot
LEFT JOIN fdw_1109.v_liq_entidad_totalxobjeto liq ON lot.snc_cuenta = REPLACE(liq.inm_ctacatastral, '-', '');
