diff --git a/log b/log
new file mode 100644
index 0000000000000000000000000000000000000000..7573ca29f69fbd661355a000f2e6acd4637b5dc1
--- /dev/null
+++ b/log
@@ -0,0 +1,462 @@
+#0 building with "default" instance using docker driver
+
+#1 [simcaq-node internal] load build definition from Dockerfile
+#1 transferring dockerfile: 575B done
+#1 DONE 0.0s
+
+#2 [simcaq-node internal] load metadata for docker.io/library/node:dubnium-stretch
+#2 DONE 1.0s
+
+#3 [simcaq-node internal] load .dockerignore
+#3 transferring context: 2B done
+#3 DONE 0.0s
+
+#4 [simcaq-node  1/12] FROM docker.io/library/node:dubnium-stretch@sha256:59531d2835edd5161c8f9512f9e095b1836f7a1fcb0ab73e005ec46047384911
+#4 DONE 0.0s
+
+#5 [simcaq-node internal] load build context
+#5 transferring context: 46.00kB 0.0s done
+#5 DONE 0.0s
+
+#6 [simcaq-node  2/12] RUN npm install --global gulp gulp-cli babel babel-cli babel-core babel-register mocha gulp-mocha gulp-eslint istanbul --force
+#6 CACHED
+
+#7 [simcaq-node  3/12] RUN npm un -g gulp
+#7 CACHED
+
+#8 [simcaq-node  4/12] RUN npm i -g gulp@3.9.0
+#8 CACHED
+
+#9 [simcaq-node  5/12] RUN mkdir API
+#9 CACHED
+
+#10 [simcaq-node  6/12] COPY . ./API
+#10 DONE 0.4s
+
+#11 [simcaq-node  7/12] WORKDIR ./API
+#11 DONE 0.2s
+
+#12 [simcaq-node  8/12] RUN npm install
+#12 19.14 
+#12 19.14 > bcrypt@5.1.1 install /API/node_modules/bcrypt
+#12 19.14 > node-pre-gyp install --fallback-to-build
+#12 19.14 
+#12 20.24 [bcrypt] Success: "/API/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" is installed via remote
+#12 20.30 
+#12 20.30 > core-js@2.6.12 postinstall /API/node_modules/core-js
+#12 20.30 > node -e "try{require('./postinstall')}catch(e){}"
+#12 20.30 
+#12 20.38 Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
+#12 20.38 
+#12 20.38 The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
+#12 20.38 > https://opencollective.com/core-js 
+#12 20.38 > https://www.patreon.com/zloirock 
+#12 20.38 
+#12 20.38 Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
+#12 20.38 
+#12 20.47 
+#12 20.47 > es5-ext@0.10.62 postinstall /API/node_modules/es5-ext
+#12 20.47 >  node -e "try{require('./_postinstall')}catch(e){}" || exit 0
+#12 20.47 
+#12 21.53 npm WARN The package babel-cli is included as both a dev and production dependency.
+#12 21.54 npm WARN The package babel-core is included as both a dev and production dependency.
+#12 21.55 npm WARN The package babel-preset-es2015 is included as both a dev and production dependency.
+#12 21.55 npm WARN The package babel-register is included as both a dev and production dependency.
+#12 21.55 npm WARN The package chai-xml is included as both a dev and production dependency.
+#12 21.56 npm WARN The package eslint is included as both a dev and production dependency.
+#12 21.56 npm WARN The package eslint-plugin-import is included as both a dev and production dependency.
+#12 21.56 npm WARN The package eslint-plugin-react is included as both a dev and production dependency.
+#12 21.56 npm WARN The package gulp-babel is included as both a dev and production dependency.
+#12 21.56 npm WARN The package gulp-cli is included as both a dev and production dependency.
+#12 21.57 npm WARN The package gulp-function is included as both a dev and production dependency.
+#12 21.57 npm WARN The package gulp-istanbul is included as both a dev and production dependency.
+#12 21.57 npm WARN The package gulp-plumber is included as both a dev and production dependency.
+#12 21.57 npm WARN The package gulp-rename is included as both a dev and production dependency.
+#12 21.57 npm WARN The package gulp-uglify is included as both a dev and production dependency.
+#12 21.58 npm WARN The package jsdoc is included as both a dev and production dependency.
+#12 21.58 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.3 (node_modules/nodemon/node_modules/fsevents):
+#12 21.58 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+#12 21.58 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
+#12 21.58 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+#12 21.58 
+#12 21.59 added 1543 packages from 1326 contributors and audited 1554 packages in 20.828s
+#12 22.27 
+#12 22.27 117 packages are looking for funding
+#12 22.27   run `npm fund` for details
+#12 22.27 
+#12 22.27 found 177 vulnerabilities (34 low, 51 moderate, 68 high, 24 critical)
+#12 22.27   run `npm audit fix` to fix them, or `npm audit` for details
+#12 DONE 23.1s
+
+#13 [simcaq-node  9/12] RUN gulp build
+#13 0.708 [14:59:07] Requiring external module babel-core/register
+#13 1.458 [14:59:08] Using gulpfile /API/gulpfile.babel.js
+#13 1.460 [14:59:08] Starting 'lint'...
+#13 1.469 [14:59:08] Finished 'lint' after 8.24 ms
+#13 1.469 [14:59:08] Starting 'compile'...
+#13 1.473 [14:59:08] Finished 'compile' after 3.63 ms
+#13 1.473 [14:59:08] Starting 'build'...
+#13 1.475 [14:59:08] Finished 'build' after 1.88 ms
+#13 DONE 8.0s
+
+#14 [simcaq-node 10/12] COPY gulpfile.template.js ./build/gulpfile.js
+#14 DONE 0.3s
+
+#15 [simcaq-node 11/12] COPY entrypoint.sh /entrypoint.sh
+#15 DONE 0.2s
+
+#16 [simcaq-node 12/12] RUN chmod +x /entrypoint.sh
+#16 DONE 0.6s
+
+#17 [simcaq-node] exporting to image
+#17 exporting layers
+#17 exporting layers 3.2s done
+#17 writing image sha256:9b0fde7e5d0a24cc48a186331ecf56b935b2ffca5afe8007705db8c171d71ede 0.0s done
+#17 naming to docker.io/library/simcaq-node-simcaq-node 0.0s done
+#17 DONE 3.3s
+Attaching to simcaq-node
+             ⦿ Watch enabled
+simcaq-node  | Starting simcaq-node
+simcaq-node  | [14:59:20] Using gulpfile /API/build/gulpfile.js
+simcaq-node  | [14:59:20] Starting 'run'...
+simcaq-node  | [14:59:20] Finished 'run' after 35 ms
+simcaq-node  | [14:59:20] [nodemon] 2.0.22
+simcaq-node  | [14:59:20] [nodemon] to restart at any time, enter `rs`
+simcaq-node  | [14:59:20] [nodemon] watching path(s): *.*
+simcaq-node  | [14:59:20] [nodemon] watching extensions: js,html,json
+simcaq-node  | [14:59:20] [nodemon] starting `node server.js`
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+simcaq-node  | query escola: SELECT escola.ano_censo AS "year", sum(escola.qt_mat_inf_cre) AS "total_inf_cre", sum(escola.qt_mat_inf_pre) AS "total_inf_pre", sum(escola.qt_mat_fund_ai) AS "total_fund_ai", sum(escola.qt_mat_fund_af) AS "total_fund_af", sum(escola.qt_mat_med) AS "total_med", escola.municipio_id AS "municipio_id", escola.no_municipio AS "municipio_name" FROM escola WHERE (escola.situacao_funcionamento_pareada = 1) AND ((escola.ensino_regular = 1 or escola.ensino_eja = 1 or escola.educacao_profissional = 1)) AND (escola.ano_censo IN (2023)) GROUP BY escola.ano_censo, escola.municipio_id, escola.no_municipio
+simcaq-node  | Key part added for capital: 11
+simcaq-node  | Capital name: Porto Velho
+simcaq-node  | Total 4738
+simcaq-node  | Key part added for capital: 12
+simcaq-node  | Capital name: Rio Branco
+simcaq-node  | Total 5229
+simcaq-node  | Key part added for capital: 13
+simcaq-node  | Capital name: Manaus
+simcaq-node  | Total 13059
+simcaq-node  | Key part added for capital: 14
+simcaq-node  | Capital name: Boa Vista
+simcaq-node  | Total 5619
+simcaq-node  | Key part added for capital: 15
+simcaq-node  | Capital name: Belém
+simcaq-node  | Total 9842
+simcaq-node  | Key part added for capital: 16
+simcaq-node  | Capital name: Macapá
+simcaq-node  | Total 2422
+simcaq-node  | Key part added for capital: 17
+simcaq-node  | Capital name: Palmas
+simcaq-node  | Total 7080
+simcaq-node  | Key part added for capital: 21
+simcaq-node  | Capital name: São Luís
+simcaq-node  | Total 17860
+simcaq-node  | Key part added for capital: 22
+simcaq-node  | Capital name: Teresina
+simcaq-node  | Total 12510
+simcaq-node  | Key part added for capital: 23
+simcaq-node  | Capital name: Fortaleza
+simcaq-node  | Total 40815
+simcaq-node  | Key part added for capital: 50
+simcaq-node  | Capital name: Campo Grande
+simcaq-node  | Total 128
+simcaq-node  | Key part added for capital: 24
+simcaq-node  | Capital name: Natal
+simcaq-node  | Total 11146
+simcaq-node  | Key part added for capital: 25
+simcaq-node  | Capital name: João Pessoa
+simcaq-node  | Total 13296
+simcaq-node  | Key part added for capital: 26
+simcaq-node  | Capital name: Recife
+simcaq-node  | Total 20277
+simcaq-node  | Key part added for capital: 27
+simcaq-node  | Capital name: Maceió
+simcaq-node  | Total 8707
+simcaq-node  | Key part added for capital: 28
+simcaq-node  | Capital name: Aracaju
+simcaq-node  | Total 6308
+simcaq-node  | Key part added for capital: 29
+simcaq-node  | Capital name: Salvador
+simcaq-node  | Total 33088
+simcaq-node  | Key part added for capital: 31
+simcaq-node  | Capital name: Belo Horizonte
+simcaq-node  | Total 53809
+simcaq-node  | Key part added for capital: 32
+simcaq-node  | Capital name: Vitória
+simcaq-node  | Total 10152
+simcaq-node  | Key part added for capital: 33
+simcaq-node  | Capital name: Rio de Janeiro
+simcaq-node  | Total 122762
+simcaq-node  | Key part added for capital: 35
+simcaq-node  | Capital name: São Paulo
+simcaq-node  | Total 376676
+simcaq-node  | Key part added for capital: 41
+simcaq-node  | Capital name: Curitiba
+simcaq-node  | Total 36955
+simcaq-node  | Key part added for capital: 42
+simcaq-node  | Capital name: Florianópolis
+simcaq-node  | Total 12894
+simcaq-node  | Key part added for capital: 43
+simcaq-node  | Capital name: Porto Alegre
+simcaq-node  | Total 19638
+simcaq-node  | Key part added for capital: 51
+simcaq-node  | Capital name: Cuiabá
+simcaq-node  | Total 14223
+simcaq-node  | Key part added for capital: 52
+simcaq-node  | Capital name: Goiânia
+simcaq-node  | Total 22738
+simcaq-node  | Key part added for capital: 53
+simcaq-node  | Capital name: Brasília
+simcaq-node  | Total 37341
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
+             ⦿ Syncing "simcaq-node" after changes were detected
diff --git a/src/libs/middlewares/id2str.js b/src/libs/middlewares/id2str.js
index d6c763c9e3d281b3763c8be632d1b4dca5a0e78f..8f81c9c47f37c9e1e0959493c7cd93207c0a93a9 100644
--- a/src/libs/middlewares/id2str.js
+++ b/src/libs/middlewares/id2str.js
@@ -254,7 +254,7 @@ function transform(removeId=false) {
         }
         // Para cada objeto do resultado
         req.result.forEach((obj) => {
-            console.log(obj),
+            // console.log(obj),
             Object.keys(obj).forEach((key) => {
                 // Se não há uma função especificada, retorna
                 if(typeof ids[key] === 'undefined') return;
diff --git a/src/libs/routes_v1/enrollmentRate.js b/src/libs/routes_v1/enrollmentRate.js
index d58abe8105a5f8cccf866fa61e55e7b2f1e9897e..46ff93c9bd6766646b1ad5542f40a4bd4e88b89e 100644
--- a/src/libs/routes_v1/enrollmentRate.js
+++ b/src/libs/routes_v1/enrollmentRate.js
@@ -50,6 +50,7 @@ EnrollmentRateApp.use(cache('15 day'));
 EnrollmentRateApp.get('/years', (req, res, next) => {
     req.sql.from('pnad_novo')
     .field('DISTINCT pnad_novo.ano_ref', 'year')
+    .where('pnad_novo.ano_ref IN (2022, 2023)')
     next();
 }, query, response('years'));
 
@@ -254,18 +255,56 @@ rqf.addField({
     }
 })
 
+let arrayCap = [];
+
+function createCompositeKey(item, dims) {
+    let keyParts = [item.year];
+
+    if (dims.includes('location')) keyParts.push(item.location_id);
+    if (dims.includes('cod_cap')) {
+        // If it's the 'escola' data (queryPartial), use municipio_name
+        // If it's the 'pnad_novo' data (queryTotal), use the capital_id
+        if (item.municipio_name) { // This indicates it's from escola
+            // keyParts.push(item.municipio_name); // Use the name for matching
+            for(let i = 11; i < 54; i++) {
+                if (id2str.capitalCode(i) === item.municipio_name && !arrayCap.includes(i)) {
+                    arrayCap.push(i); // Store the ID to avoid duplicates
+                    keyParts.push(i); // Convert name to ID for matching
+                    console.log("Key part added for capital:", i);
+                    console.log("Capital name:", item.municipio_name);
+                    console.log("Total", item.total_inf_cre);
+                    break;
+                }
+            }
+        } else if (item.capital_id) { // This indicates it's from pnad_novo
+            keyParts.push(item.capital_id); // Convert ID to name for matching
+        }
+    }
+    if (dims.includes('region')) keyParts.push(item.region_id);
+    if (dims.includes('state')) keyParts.push(item.state_id || item.estado_id);
+    
 
+    return keyParts.join('_');
+}
 
-function matchQueries(queryPartial, queryTotal) {
+// Add a parameter to matchQueries to receive the active dimensions
+function matchQueries(queryPartial, queryTotal, activeDims) { // Added activeDims parameter
     let match = [];
     
     const escolaMap = new Map();
+
+    // console.log("queryPartial:", queryPartial); // For debugging
+    // console.log("queryTotal:", queryTotal); // For debugging
+    // Populate the escolaMap using the composite key
     queryPartial.forEach(partial => {
-        escolaMap.set(partial.year, partial);
+        const key = createCompositeKey(partial, activeDims);
+        escolaMap.set(key, partial);
     });
 
+    // Iterate through PNAD data and find matching escola data using the same composite key
     queryTotal.forEach(pnad => {
-        const escolaData = escolaMap.get(pnad.year);
+        const key = createCompositeKey(pnad, activeDims); // Use the same composite key for PNAD data
+        const escolaData = escolaMap.get(key); // Retrieve matching escola data
         const ageRange = pnad.age_range;
 
         const modalityMap = {
@@ -276,36 +315,74 @@ function matchQueries(queryPartial, queryTotal) {
             5: { id: 7, field: 'total_med', name: id2str.attendedModality(7) }
         };
 
+        // If a match is found AND the age range has a corresponding modality
         if (escolaData && modalityMap[ageRange]) {
             const modality = modalityMap[ageRange];
-            const partialValue = escolaData[modality.field] || 0;
+            const partialValue = escolaData[modality.field] || 0; // Get the specific enrollment count
 
-            
-            match.push({
+            // Build the result object, dynamically adding dimension fields
+            const resultItem = {
                 year: pnad.year,
                 age_range: ageRange,
                 age_range_name: id2str.ageRange(ageRange),
                 attended_modality_id: modality.id,
                 attended_modality_name: modality.name,
-                total: ((partialValue / pnad.total) * 100).toFixed(2),
-                location_id: pnad.location_id,
-                location_name: id2str.location(pnad.location_id),
-                cod_cap_id: pnad.capital_id,
-                cod_cap_name: id2str.capitalCode(pnad.capital_id),
-                region_id: pnad.region_id,
-                region_name: id2str.regionCode(pnad.region_id),
-                state_id: pnad.state_id,
-                state_name: id2str.stateName(pnad.state_id),
-            });
+                total: ((partialValue / pnad.total) * 100).toFixed(2), // Calculate enrollment rate
+                total_population: pnad.total // Include total population for context/debugging
+            };
+
+            // Dynamically add the requested dimensions to the result item
+            if (activeDims.includes('location')) {
+                resultItem.location_id = pnad.location_id;
+                resultItem.location_name = id2str.location(pnad.location_id);
+            }
+            if (activeDims.includes('cod_cap')) {
+                // Here, we ensure the ID and name for the output come from PNAD (capital_id)
+                resultItem.cod_cap_id = pnad.capital_id;
+                resultItem.cod_cap_name = id2str.capitalCode(pnad.capital_id);
+            }
+            if (activeDims.includes('region')) {
+                resultItem.region_id = pnad.region_id;
+                resultItem.region_name = id2str.regionCode(pnad.region_id);
+            }
+            if (activeDims.includes('state')) {
+                resultItem.state_id = pnad.state_id;
+                resultItem.state_name = id2str.stateName(pnad.state_id);
+            }
+            
+            match.push(resultItem);
+
         } else {
-            match.push({
+            // If no match found for the composite key, or no matching modality for age_range
+            const noMatchItem = {
                 attended_modality_id: 0,
                 attended_modality_name: 'Não informado',
                 year: pnad.year,
                 age_range: ageRange,
-                total: 0,
-                total_population: pnad.total
-            });
+                age_range_name: id2str.ageRange(ageRange),
+                total: 0, // Enrollment rate is 0 if no matching data
+                total_population: pnad.total // Still include total population
+            };
+
+            // Dynamically add placeholders for dimensions even if no match
+            if (activeDims.includes('location')) {
+                noMatchItem.location_id = pnad.location_id || 0;
+                noMatchItem.location_name = id2str.location(pnad.location_id || 0);
+            }
+            if (activeDims.includes('cod_cap')) {
+                noMatchItem.cod_cap_id = pnad.capital_id || 0;
+                noMatchItem.cod_cap_name = id2str.capitalCode(pnad.capital_id || 0);
+            }
+            if (activeDims.includes('region')) {
+                noMatchItem.region_id = pnad.region_id || 0;
+                noMatchItem.region_name = id2str.regionCode(pnad.region_id || 0);
+            }
+            if (activeDims.includes('state')) {
+                noMatchItem.state_id = pnad.state_id || 0;
+                noMatchItem.state_name = id2str.stateName(pnad.state_id || 0);
+            }
+
+            match.push(noMatchItem);
         }
     });
 
@@ -356,44 +433,161 @@ EnrollmentRateApp.get('/', rqf.parse(), rqf.build(),  (req, res, next) => {
     // .where('escola.ano_censo IN (2019, 2022, 2023)')
     // .group('escola.ano_censo');
 
-    let query_escola = squel.select()
-    query_escola.from('escola')
-    .field('escola.ano_censo', 'year')
-    .field('sum(escola.qt_mat_inf_cre)', 'total_inf_cre')
-    .field('sum(escola.qt_mat_inf_pre)', 'total_inf_pre')
-    .field('sum(escola.qt_mat_fund_ai)', 'total_fund_ai')
-    .field('sum(escola.qt_mat_fund_af)', 'total_fund_af')
-    .field('sum(escola.qt_mat_med)', 'total_med')
-    .field('escola.localizacao_id', 'location_id')
-    .field('escola.regiao_id', 'region_id')
-    .where('escola.situacao_funcionamento_pareada = 1')
-    .where('(escola.ensino_regular = 1 or escola.ensino_eja = 1 or escola.educacao_profissional = 1)')
-    .where('escola.ano_censo IN (2019, 2022, 2023)')
-    .group('escola.localizacao_id')
-    .group('escola.ano_censo')
-    .group('escola.regiao_id');
-    req.querySet.push(query_escola);
-    
-    let query_pnad = req.sql.clone();
-    query_pnad.from('pnad_novo')
-    .field('round(sum(pnad_novo.peso_domicilio_pessoas_com_cal), 0)', 'total')
-    .field('pnad_novo.faixa_etaria', 'age_range')
-    .field('pnad_novo.ano_ref', 'year')
-    .field('pnad_novo.situacao_domicilio', 'location_id')
-    .field('pnad_novo.cod_cap', 'capital_id')
-    .field('pnad_novo.cod_regiao', 'region_id')
-    .field('pnad_novo.cod_uf', 'state_id')
-    .where('pnad_novo.ano_ref IN (2019, 2022, 2023) AND pnad_novo.faixa_etaria IN (1, 2, 3, 4, 5)')
-    .group('pnad_novo.ano_ref')
-    .group('pnad_novo.faixa_etaria')
-    .group('pnad_novo.situacao_domicilio')
-    .group('pnad_novo.cod_cap')
-    .group('pnad_novo.cod_regiao')
-    .group('pnad_novo.cod_uf')
-    .order('pnad_novo.ano_ref')
-    .order('pnad_novo.faixa_etaria');
-
-    req.querySet.push(query_pnad);
+    if (req.query.dims.includes('location')){
+        let query_escola = squel.select()
+        query_escola.from('escola')
+        .field('escola.ano_censo', 'year')
+        .field('sum(escola.qt_mat_inf_cre)', 'total_inf_cre')
+        .field('sum(escola.qt_mat_inf_pre)', 'total_inf_pre')
+        .field('sum(escola.qt_mat_fund_ai)', 'total_fund_ai')
+        .field('sum(escola.qt_mat_fund_af)', 'total_fund_af')
+        .field('sum(escola.qt_mat_med)', 'total_med')
+        .field('escola.localizacao_id', 'location_id')
+        .where('escola.situacao_funcionamento_pareada = 1')
+        .where('(escola.ensino_regular = 1 or escola.ensino_eja = 1 or escola.educacao_profissional = 1)')
+        .where('escola.ano_censo IN (2019, 2022, 2023)')
+        .group('escola.localizacao_id')
+        .group('escola.ano_censo')
+        req.querySet.push(query_escola);
+        
+        let query_pnad = req.sql.clone();
+        query_pnad.from('pnad_novo')
+        .field('round(sum(pnad_novo.peso_domicilio_pessoas_com_cal), 0)', 'total')
+        .field('pnad_novo.faixa_etaria', 'age_range')
+        .field('pnad_novo.ano_ref', 'year')
+        .field('pnad_novo.situacao_domicilio', 'location_id')
+        .where('pnad_novo.ano_ref IN (2019, 2022, 2023) AND pnad_novo.faixa_etaria IN (1, 2, 3, 4, 5)')
+        .group('pnad_novo.ano_ref')
+        .group('pnad_novo.faixa_etaria')
+        .group('pnad_novo.situacao_domicilio')
+        .order('pnad_novo.ano_ref')
+        .order('pnad_novo.faixa_etaria');
+        req.querySet.push(query_pnad);      
+    }
+    else if (req.query.dims.includes('cod_cap')) {
+        let query_escola = squel.select()
+        query_escola.from('escola')
+        .field('escola.ano_censo', 'year')
+        .field('sum(escola.qt_mat_inf_cre)', 'total_inf_cre')
+        .field('sum(escola.qt_mat_inf_pre)', 'total_inf_pre')
+        .field('sum(escola.qt_mat_fund_ai)', 'total_fund_ai')
+        .field('sum(escola.qt_mat_fund_af)', 'total_fund_af')
+        .field('sum(escola.qt_mat_med)', 'total_med')
+        .field('escola.municipio_id', 'municipio_id')
+        .field('escola.no_municipio', 'municipio_name')
+        .where('escola.situacao_funcionamento_pareada = 1')
+        .where('(escola.ensino_regular = 1 or escola.ensino_eja = 1 or escola.educacao_profissional = 1)')
+        .where('escola.ano_censo IN (2023)')
+        .group('escola.ano_censo')
+        .group('escola.municipio_id')
+        .group('escola.no_municipio');
+        req.querySet.push(query_escola);
+        
+        let query_pnad = req.sql.clone();
+        query_pnad.from('pnad_novo')
+        .field('round(sum(pnad_novo.peso_domicilio_pessoas_com_cal), 0)', 'total')
+        .field('pnad_novo.faixa_etaria', 'age_range')
+        .field('pnad_novo.ano_ref', 'year')
+        .field('pnad_novo.cod_cap', 'capital_id')
+        .where('pnad_novo.ano_ref IN (2023) AND pnad_novo.faixa_etaria IN (1, 2, 3, 4, 5)')
+        .group('pnad_novo.ano_ref')
+        .group('pnad_novo.faixa_etaria')
+        .group('pnad_novo.cod_cap')
+        .order('pnad_novo.ano_ref')
+        .order('pnad_novo.faixa_etaria');
+        req.querySet.push(query_pnad);
+
+        console.log("query escola:", query_escola.toString());
+    }
+    else if (req.query.dims.includes('region')) {
+        let query_escola = squel.select()
+        query_escola.from('escola')
+        .field('escola.ano_censo', 'year')
+        .field('sum(escola.qt_mat_inf_cre)', 'total_inf_cre')
+        .field('sum(escola.qt_mat_inf_pre)', 'total_inf_pre')
+        .field('sum(escola.qt_mat_fund_ai)', 'total_fund_ai')
+        .field('sum(escola.qt_mat_fund_af)', 'total_fund_af')
+        .field('sum(escola.qt_mat_med)', 'total_med')
+        .field('escola.regiao_id', 'region_id')
+        .where('escola.situacao_funcionamento_pareada = 1')
+        .where('(escola.ensino_regular = 1 or escola.ensino_eja = 1 or escola.educacao_profissional = 1)')
+        .where('escola.ano_censo IN (2019, 2022, 2023)')
+        .group('escola.ano_censo')
+        .group('escola.regiao_id')
+        req.querySet.push(query_escola);
+        
+        let query_pnad = req.sql.clone();
+        query_pnad.from('pnad_novo')
+        .field('round(sum(pnad_novo.peso_domicilio_pessoas_com_cal), 0)', 'total')
+        .field('pnad_novo.faixa_etaria', 'age_range')
+        .field('pnad_novo.ano_ref', 'year')
+        .field('pnad_novo.cod_regiao', 'region_id')
+        .where('pnad_novo.ano_ref IN (2019, 2022, 2023) AND pnad_novo.faixa_etaria IN (1, 2, 3, 4, 5)')
+        .group('pnad_novo.ano_ref')
+        .group('pnad_novo.faixa_etaria')
+        .group('pnad_novo.cod_regiao')
+        .order('pnad_novo.ano_ref')
+        .order('pnad_novo.faixa_etaria');
+        req.querySet.push(query_pnad);    
+    } 
+    else if (req.query.dims.includes('state')) {
+        let query_escola = squel.select()
+        query_escola.from('escola')
+        .field('escola.ano_censo', 'year')
+        .field('sum(escola.qt_mat_inf_cre)', 'total_inf_cre')
+        .field('sum(escola.qt_mat_inf_pre)', 'total_inf_pre')
+        .field('sum(escola.qt_mat_fund_ai)', 'total_fund_ai')
+        .field('sum(escola.qt_mat_fund_af)', 'total_fund_af')
+        .field('sum(escola.qt_mat_med)', 'total_med')
+        .field('escola.estado_id', 'state_id')
+        .where('escola.situacao_funcionamento_pareada = 1')
+        .where('(escola.ensino_regular = 1 or escola.ensino_eja = 1 or escola.educacao_profissional = 1)')
+        .where('escola.ano_censo IN (2019, 2022, 2023)')
+        .group('escola.ano_censo')
+        .group('escola.estado_id');
+        req.querySet.push(query_escola);
+        
+        let query_pnad = req.sql.clone();
+        query_pnad.from('pnad_novo')
+        .field('round(sum(pnad_novo.peso_domicilio_pessoas_com_cal), 0)', 'total')
+        .field('pnad_novo.faixa_etaria', 'age_range')
+        .field('pnad_novo.ano_ref', 'year')
+        .field('pnad_novo.cod_uf', 'state_id')
+        .where('pnad_novo.ano_ref IN (2019, 2022, 2023) AND pnad_novo.faixa_etaria IN (1, 2, 3, 4, 5)')
+        .group('pnad_novo.ano_ref')
+        .group('pnad_novo.faixa_etaria')
+        .group('pnad_novo.cod_uf')
+        .order('pnad_novo.ano_ref')
+        .order('pnad_novo.faixa_etaria');
+        req.querySet.push(query_pnad);
+    }
+    else {
+        let query_escola = squel.select()
+        query_escola.from('escola')
+        .field('escola.ano_censo', 'year')
+        .field('sum(escola.qt_mat_inf_cre)', 'total_inf_cre')
+        .field('sum(escola.qt_mat_inf_pre)', 'total_inf_pre')
+        .field('sum(escola.qt_mat_fund_ai)', 'total_fund_ai')
+        .field('sum(escola.qt_mat_fund_af)', 'total_fund_af')
+        .field('sum(escola.qt_mat_med)', 'total_med')
+        .where('escola.situacao_funcionamento_pareada = 1')
+        .where('(escola.ensino_regular = 1 or escola.ensino_eja = 1 or escola.educacao_profissional = 1)')
+        .where('escola.ano_censo IN (2019, 2022, 2023)')
+        .group('escola.ano_censo')
+        req.querySet.push(query_escola);
+        
+        let query_pnad = req.sql.clone();
+        query_pnad.from('pnad_novo')
+        .field('round(sum(pnad_novo.peso_domicilio_pessoas_com_cal), 0)', 'total')
+        .field('pnad_novo.faixa_etaria', 'age_range')
+        .field('pnad_novo.ano_ref', 'year')
+        .where('pnad_novo.ano_ref IN (2019, 2022, 2023) AND pnad_novo.faixa_etaria IN (1, 2, 3, 4, 5)')
+        .group('pnad_novo.ano_ref')
+        .group('pnad_novo.faixa_etaria')
+        .order('pnad_novo.ano_ref')
+        .order('pnad_novo.faixa_etaria');
+        req.querySet.push(query_pnad);
+    }
 
     // let query_pnad = squel.select()
     // query_pnad.from('pnad_novo')
@@ -410,7 +604,9 @@ EnrollmentRateApp.get('/', rqf.parse(), rqf.build(),  (req, res, next) => {
     next();
 
 }, multiQuery, (req, res, next) => {
-    let newObj = matchQueries(req.result[0], req.result[1]);
+    // console.log("result[0]: ", req.result[0]);
+    // console.log("result[1]: ", req.result[1]);
+    let newObj = matchQueries(req.result[0], req.result[1], req.query.dims);
     req.result = newObj;
 
 next();