-- Simulación de Recálculo snc_cuenta (Regla 26) para Zona Urbana y Rural
(
    SELECT 
        'URBANA (0)' as zona,
        ccatastral as entrada_cruda,
        LTRIM(REGEXP_REPLACE(SUBSTRING(ccatastral FROM 4), '[^a-zA-Z0-9]', '', 'g'), '0') as snc_cuenta_recalculada
    FROM public.e505_lotes_activos 
    WHERE tipo_cuenta = 0
    LIMIT 5
)
UNION ALL
(
    SELECT 
        'RURAL (1)' as zona,
        padron as entrada_cruda,
        padron::text as snc_cuenta_recalculada
    FROM public.e505_lotes_activos 
    WHERE tipo_cuenta = 1
    LIMIT 5
);
