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 = '14107'  and replace(replace(rr.direccion_predio, '-', ' '), '/', '') like '%HOEVEL 4583%' and rr.num_manzana = '3820' and rr.num_predial = '8'  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 = '14107'  and replace(replace(rr.direccion_predio, '-', ' '), '/', '') like '%HOEVEL 4583%' and rr.num_manzana = '3820' and rr.num_predial = '8'  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 = '14107'  and replace(replace(rr.direccion_predio, '-', ' '), '/', '') like '%HOEVEL 4583%' and rr.num_manzana = '3820' and rr.num_predial = '8' ) 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:

Pje Ptor Carlos Sot. 3011 - La Serena Bc E Pc 150 Lt 2 - Coquimbo F Santa Maria 2265 - Valparaiso Renaca Alto Sur - Mz A 17 Lt 1 - Vina Del Mar Chacra San Carlos - San Esteban 1 Y 2 De Octubre 503 - Rancagua Pb Sta Maria Mz Q St 9 - Constitucion Lautaro Pc 14 Lote A- 1 - Canete Zenteno 0205 - Temuco Quintupeo 574 - Puerto Montt Croacia 1222 - Punta Arenas Hanga Roa 1136 - Recoleta Pasaje 5 138 - Penaflor Callao 3366 Bx 52 - Las Condes I Goyenechea 2800 Bx E 2083 - Las Condes Cristobal Colon 4152 Bx 181 - Las Condes Foresta Oriente 12001 Cs 04 - Las Condes Sta Julia 977 - La Florida E Fernandez 2302 Bd 156 - Macul El Afluente 2571 B Dp 13 - Penalolen