From be1511b4c0a548c3b377d1e65d0811ce4dd6bc94 Mon Sep 17 00:00:00 2001
From: fgs21 <fgs21@inf.ufpr.br>
Date: Wed, 11 Sep 2024 11:33:16 -0300
Subject: [PATCH] [FIX] Fixing 'where' of the base query

---
 src/libs/routes_v1/courseAggregate.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libs/routes_v1/courseAggregate.js b/src/libs/routes_v1/courseAggregate.js
index b9dc7f61..5ec2a3cb 100644
--- a/src/libs/routes_v1/courseAggregate.js
+++ b/src/libs/routes_v1/courseAggregate.js
@@ -402,6 +402,7 @@ CourseAggregateApp.get('/', rqf.parse(), rqf.build(),  (req, res, next) => {
     req.sql.from('curso_superior_agregado')
     .field('count(distinct(cod_curso))', 'total')
     .field('curso_superior_agregado.ano_censo', 'year')
+    .where('curso_superior_agregado.tp_nivel_acad = 1 AND qtd_cursos = 1')
     .group('curso_superior_agregado.ano_censo')
     .order('curso_superior_agregado.ano_censo')
     console.log(req.sql.toString())
-- 
GitLab