Skip to content
Snippets Groups Projects
Commit 80c7be29 authored by Fernando Gbur dos Santos's avatar Fernando Gbur dos Santos
Browse files

[ADD] illiteracy filter added

parent 58e9c16e
No related branches found
No related tags found
3 merge requests!391Hom -> Prod,!386Merge development -> homologa,!383FIrst deploy of new route 'new_pnad'
...@@ -85,6 +85,16 @@ rqf.addField({ ...@@ -85,6 +85,16 @@ rqf.addField({
foreign: 'cod_uf', foreign: 'cod_uf',
foreignTable: 'pnad_novo' foreignTable: 'pnad_novo'
} }
}).addValue({
name: 'illiteracy',
table: 'pnad_novo',
tableField: 'anafalbetismo',
resultField: 'illiteracy',
where: {
relation: '=',
type: 'integer',
field: 'anafalbetismo'
}
}).addValue({ }).addValue({
name: 'min_year', name: 'min_year',
table: 'pnad_novo', table: 'pnad_novo',
...@@ -156,7 +166,7 @@ rqf.addField({ ...@@ -156,7 +166,7 @@ rqf.addField({
PnadNovoApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { PnadNovoApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
req.sql.from('pnad_novo') req.sql.from('pnad_novo')
.field('sum(distinct(pnad_novo.projecao_populacao_por_niveis_geo))', 'name') .field('round(sum(pnad_novo.projecao_populacao_por_niveis_geo), 0)', 'name')
.field('pnad_novo.ano_ref', 'year') .field('pnad_novo.ano_ref', 'year')
.group('pnad_novo.ano_ref') .group('pnad_novo.ano_ref')
next(); next();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment