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 = '10301'  and replace(replace(rr.direccion_predio, '-', ' '), '/', '') like '%AGUILAS BLANCAS 250%' and rr.num_manzana = '586' and rr.num_predial = '15'  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 = '10301'  and replace(replace(rr.direccion_predio, '-', ' '), '/', '') like '%AGUILAS BLANCAS 250%' and rr.num_manzana = '586' and rr.num_predial = '15'  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 = '10301'  and replace(replace(rr.direccion_predio, '-', ' '), '/', '') like '%AGUILAS BLANCAS 250%' and rr.num_manzana = '586' and rr.num_predial = '15' ) 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:

Pj E Guerra R 0341 - Arica Villa El Oro Mz C St 28 - Ovalle 6 Norte 745 Loc 03 - Vina Del Mar Simpson 217 - Quilpue Lote 12 -a 2 Pc 12 Pp Sta. Matilde - Pichidegua La Risquera - Constitucion Monte Flor - Parral Av Circunvalacion 319 - Chillan A Prat 135 - Yungay Pjm.h.inostroza A 4 1040 Lt 35 Mzc - Coronel Par Vial Las Torres 4425 Cs 51 - San Pedro De La Paz Inglaterra 0641 - Temuco Remanso 2057 - Puerto Montt Candelaria 542 - Llanquihue Travesia E.florencia 8721 313 - Pudahuel Chacao Los Parrones Lt A-b - Penaflor San Eugenio 1209 Bx 2037 Abx 2037 Bbd 20 - Nunoa Ebro 2799 Bod 68 - Las Condes Hermanos Cabot 6688 Dp. 63 - Las Condes Gral B Parada 1075 - La Pintana