Spaces:
Running
Running
atualizacao automatica dos dados da CVM
Browse files
app.js
CHANGED
|
@@ -985,7 +985,7 @@ catch (e) { console.warn(`busca ${quando}:`, e.message); return []; }
|
|
| 985 |
};
|
| 986 |
const gest = await seguro(`
|
| 987 |
select 'g' tipo, grupo_id::varchar id, grupo_nome nome,
|
| 988 |
-
n_fundos::varchar || ' fundos' extra
|
| 989 |
from dim_gestora
|
| 990 |
where upper(grupo_nome) like '%${t}%' and grupo_id >= 0
|
| 991 |
order by pl_total desc limit 4`, 'gestora');
|
|
@@ -4353,7 +4353,7 @@ t => `select * from (select 'gestora' tipo, grupo_id::varchar id, grupo_nome v
|
|
| 4353 |
union all
|
| 4354 |
select * from (select 'fundo' tipo, cnpj id, nome v from dim_fundo
|
| 4355 |
where upper(strip_accents(nome)) like '%${t}%'
|
| 4356 |
-
and
|
| 4357 |
order by pl_atual desc nulls last limit 5)`,
|
| 4358 |
null,
|
| 4359 |
linhas => linhas.slice(0, 10).map(x => ({
|
|
|
|
| 985 |
};
|
| 986 |
const gest = await seguro(`
|
| 987 |
select 'g' tipo, grupo_id::varchar id, grupo_nome nome,
|
| 988 |
+
${estado.incluirExclusivos ? 'n_fundos' : 'n_fundos_nao_excl'}::varchar || ' fundos' extra
|
| 989 |
from dim_gestora
|
| 990 |
where upper(grupo_nome) like '%${t}%' and grupo_id >= 0
|
| 991 |
order by pl_total desc limit 4`, 'gestora');
|
|
|
|
| 4353 |
union all
|
| 4354 |
select * from (select 'fundo' tipo, cnpj id, nome v from dim_fundo
|
| 4355 |
where upper(strip_accents(nome)) like '%${t}%'
|
| 4356 |
+
and ${vivoSql('dim_fundo')}
|
| 4357 |
order by pl_atual desc nulls last limit 5)`,
|
| 4358 |
null,
|
| 4359 |
linhas => linhas.slice(0, 10).map(x => ({
|