Skip to content
Snippets Groups Projects
Commit 7dc4874f authored by lgtg20's avatar lgtg20
Browse files

trying

parent 892a5cf7
No related branches found
No related tags found
3 merge requests!417[ADD] Indicator "Taxa de Atendimento Educacional" updated on production!,!416[ADD] Route almost ready, some tests needed. Comments added and filters that...,!410Aggregate enrollment
......@@ -291,6 +291,19 @@ rqf.addField({
// Return all cities
enrollmentAggregateApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
console.log(req.query);
if (req.query.dims.includes('gender'))
{
req.sql.from('escola')
.field('SUM(escola.qt_mat_bas_mas)', 'total_mas')
.field('SUM(escola.qt_mat_bas_fem)', 'total_fem')
.field('escola.ano_censo', 'year')
.group('escola.ano_censo')
.order('escola.ano_censo');
}
req.sql.from('escola')
.field('SUM(escola.qt_mat_bas)', 'total')
.field('escola.ano_censo', 'year')
......
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