select
"id",
"nome",
"cidade_id",
"bairro_id"
from
"geral"."logradouros"
where
LOWER("geral"."logradouros"."nome") LIKE ? ESCAPE '\' and exists (select * from "geral"."cidades" where "geral"."logradouros"."cidade_id" = "geral"."cidades"."id" and "geral"."cidades"."id" = ' % santa % ') and "geral"."logradouros"."deleted_at" is null order by "geral"."logradouros"."id" asc limit 51
the query was completely different and complex, despite bringing the result
query telescope