SELECT
*,
CAST(i.ativo AS unsigned int) as ativ,
CAST(i.aluguel AS unsigned int) as alg,
CAST(i.venda AS unsigned int) as vend
FROM imovel i
left join imovel_bairro b on b.pk_imovel_bairro = i.fk_imovel_bairro
left join imovel_tipo t on t.pk_imovel_tipo = i.fk_imovel_tipo
left join imovel_fotos f on f.pk_imovel_fotos = i.fk_foto_principal
left join imovel_cidade c on c.pk_imovel_cidade = i.fk_imovel_cidade
where c.estado_sigla = 'PR' and anunciar = 1 and i.imovel_na_planta = 1 and fk_imovel_cidade =3 order by valor desc