From 451f2376965c2896020b2bb3ad3542809fd12250 Mon Sep 17 00:00:00 2001
From: Rafael S Castliho <rscastilho@inf.ufpr.br>
Date: Wed, 16 Dec 2020 11:55:35 -0300
Subject: [PATCH] i340

---
 src/libs/routes/SMPPIR/indigenas_development.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libs/routes/SMPPIR/indigenas_development.js b/src/libs/routes/SMPPIR/indigenas_development.js
index 286b9481..70bd03d6 100644
--- a/src/libs/routes/SMPPIR/indigenas_development.js
+++ b/src/libs/routes/SMPPIR/indigenas_development.js
@@ -128,7 +128,7 @@ rqf.addField({
 
 cad_unico_count.get('/', rqf.parse(), rqf.build(), function (req, res, next) {
     console.log(req.sql.toString());
-    req.sql.field('COUNT(total) AS Total').from('indigenas_development_ag');
+    req.sql.field('COUNT(distinct id_familia) AS Total').from('indigenas_development_ag');
     next();
 }, query, response('cad_unico'));
 
-- 
GitLab