Skip to content
Snippets Groups Projects
Commit 960ce9be authored by Guiusepe's avatar Guiusepe
Browse files

Merge branch '2021_ensino_basico' into 'homologa'

employees indicator now takes the year information from school table, since...

See merge request !337
parents fa6c0a76 0cb9427c
No related branches found
No related tags found
3 merge requests!342Hotfix filters,!339employees indicator now takes the year information from school table, since...,!337employees indicator now takes the year information from school table, since...
......@@ -51,15 +51,15 @@ employeesApp.use(cache('15 day'));
// Returns a tuple of start and ending years of the complete enrollments dataset.
employeesApp.get('/year_range', (req, res, next) => {
req.sql.from('docente')
.field('MIN(docente.ano_censo)', 'start_year')
.field('MAX(docente.ano_censo)', 'end_year');
req.sql.from('escola')
.field('MIN(escola.ano_censo)', 'start_year')
.field('MAX(escola.ano_censo)', 'end_year');
next();
}, query, response('range'));
employeesApp.get('/years', (req, res, next) => {
req.sql.from('docente').
field('DISTINCT docente.ano_censo', 'year');
req.sql.from('escola').
field('DISTINCT escola.ano_censo', 'year');
next();
}, query, response('years'));
......
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