Skip to content
Snippets Groups Projects
Commit f5911663 authored by Fernando Erd's avatar Fernando Erd :ok_hand:
Browse files

Add new field in query

parent c3545d77
No related branches found
No related tags found
1 merge request!117Add new field in gloss enrollment && Fix dims in gloss
Pipeline #
...@@ -298,6 +298,8 @@ glossEnrollmentRatioApp.get('/', rqf.parse(),(req, res, next) => { ...@@ -298,6 +298,8 @@ glossEnrollmentRatioApp.get('/', rqf.parse(),(req, res, next) => {
.field('matricula.ano_censo', 'year') .field('matricula.ano_censo', 'year')
.group('matricula.ano_censo') .group('matricula.ano_censo')
.order('matricula.ano_censo') .order('matricula.ano_censo')
.where('matricula.tipo <= 3')
if ( "education_level_basic" in req.dims ) { if ( "education_level_basic" in req.dims ) {
req.sql.field('matricula.etapas_mod_ensino_segmento_id', 'age_range') req.sql.field('matricula.etapas_mod_ensino_segmento_id', 'age_range')
req.sql.where('matricula.etapas_mod_ensino_segmento_id = 1 OR matricula.etapas_mod_ensino_segmento_id = 2 OR matricula.etapas_mod_ensino_segmento_id = 4 OR matricula.etapas_mod_ensino_segmento_id = 5 OR matricula.etapas_mod_ensino_segmento_id = 6') req.sql.where('matricula.etapas_mod_ensino_segmento_id = 1 OR matricula.etapas_mod_ensino_segmento_id = 2 OR matricula.etapas_mod_ensino_segmento_id = 4 OR matricula.etapas_mod_ensino_segmento_id = 5 OR matricula.etapas_mod_ensino_segmento_id = 6')
......
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