Table 'marvic_db.properties_properties' doesn't exist
SELECT DISTINCT properties_loc1.name_fr_loc1 AS country, properties_loc1.id_loc1 AS id FROM properties_loc4 towns INNER JOIN properties_properties ON properties_properties.localidad_prop = towns.id_loc4 INNER JOIN properties_loc3 areas1 ON towns.loc3_loc4 = areas1.id_loc3 LEFT OUTER JOIN properties_loc3 ON areas1.parent_loc3 = properties_loc3.id_loc3 INNER JOIN properties_loc2 province1 ON areas1.loc2_loc3 = province1.id_loc2 LEFT OUTER JOIN properties_loc2 ON province1.parent_loc2 = properties_loc2.id_loc2 INNER JOIN properties_loc1 ON province1.loc1_loc2 = province1.id_loc2 LEFT OUTER JOIN properties_loc4 ON towns.parent_loc4 = properties_loc4.id_loc4 WHERE properties_properties.activado_prop = 1 AND alquilado_prop = 0 AND vendido_prop = 0 GROUP BY properties_loc1.name_fr_loc1 ORDER BY country ASC