select distinct	af.num_manzana AS manzana,
					af.num_predial AS predio,
					CONCAT(af.num_manzana, '-', af.num_predial) as rol,
					af.descripcion_comuna,
					af.direccion_predio,
					af.avaluo_fiscal,
					af.avaluo_exento,
					af.id_comuna,
					(af.avaluo_fiscal - af.avaluo_exento) as avaluo_total,
					af.contribucion_semestral,
					af.superficie_total,
					af.id_comuna_rol1,
					af.num_manzana_rol1,
					af.num_predial_rol1,
					rr.nombre_propietario,
					rr.anio_termino_exencion,
					case when rr.codigo_ubicacion = 'R' then 'Rural' else 'Urbano' end as codigo_ubicacion,
					coalesce(cd.descripcion_destino, af.descripcion_destino) as descripcion_destino
					 from (select num_manzana, num_predial, direccion_predio, avaluo_fiscal, avaluo_exento, contribucion_semestral, descripcion_comuna, rr.id_comuna, rr.superficie_total, rr.id_comuna_rol1, rr.num_manzana_rol1, rr.num_predial_rol1, cd.descripcion_destino  from roles_no_agricolas rr inner join codigos_comunas co on rr.id_comuna = co.id_comuna  left join codigos_destinos cd on rr.id_destino = cd.id_destino  where 1 = 1   and rr.id_comuna = '15108'  and replace(replace(rr.direccion_predio, '-', ' '), '/', '') like '%CERRO COLORADO 6010 DP 306%' and rr.num_manzana = '927' and rr.num_predial = '510'  union select num_manzana, num_predial, direccion_predio, avaluo_fiscal, avaluo_exento, contribucion_semestral, descripcion_comuna, rr.id_comuna, 0 as superficie_total, 0 as id_comuna_rol1, 0 as num_manzana_rol1, 0 as num_predial_rol1, cd.descripcion_destino  from roles_agricolas rr inner join codigos_comunas co on rr.id_comuna = co.id_comuna  left join codigos_destinos cd on rr.id_destino = cd.id_destino  where 1 = 1   and rr.id_comuna = '15108'  and replace(replace(rr.direccion_predio, '-', ' '), '/', '') like '%CERRO COLORADO 6010 DP 306%' and rr.num_manzana = '927' and rr.num_predial = '510' union 
		select num_manzana, num_predial, direccion_predial, avaluo_exento as avaluo_fiscal, avaluo_exento, '' as contribucion_semestral, descripcion_comuna, rr.id_comuna, 0 as superficie_total, 0 as id_comuna_rol1, 0 as num_manzana_rol1, 0 as num_predial_rol1, cd.descripcion_destino  
                         from roles_propietarios rr 
                         inner join codigos_comunas co on rr.id_comuna = co.id_comuna  
                         left join codigos_destinos cd on rr.id_destino = cd.id_destino  
		 where 1 = 1   and rr.id_comuna = '15108'  and replace(replace(rr.direccion_predio, '-', ' '), '/', '') like '%CERRO COLORADO 6010 DP 306%' and rr.num_manzana = '927' and rr.num_predial = '510' ) af  left join codigos_destinos cd on rr.id_destino = cd.id_destino 
Avaluos.cl

Consulta la superficie, año, material, calidad y destino

SIN INFORMACION

Últimas 20 consultas:

Sofia 2462 - Calama Padre Honorio 441 - Copiapo Melipilla 674 A Bl 2 -a Dp 42 - Valparaiso El Bosque 0368 Lt 34 - Villa Alemana Pje Centenario St 7 Mz V - Los Alamos Manqueche Lt 4 - Tirua H Parada 1434 - Victoria La Rivera Hj 4 Lt 1 - Panguipulli Chacarillas 1507 - Osorno Pasaje Sin Nombre - Quinchao Av. Vicuna Mackenna 601 Dp 2411 - Santiago Zenteno 1490 Torre A Bd 3119 - Santiago Sur Pj Cord Claudio Gay 2622 - Penaflor Prof Juan Cabrera 0946 - Melipilla San Juan De Luz 4060 Bd 109 - Providencia H De Magallanes 1699 Dp 106 - Las Condes Licancabur (pje 6 ) 3929 - Macul Pj Los Torneros 5794 - Penalolen P Aguirre C 01202 - La Cisterna Bahia Orange 3949 - Puente Alto