Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SQL Scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HOTMapper
SQL Scripts
Commits
663f54ff
Commit
663f54ff
authored
6 years ago
by
Edu Trevisan
Browse files
Options
Downloads
Patches
Plain Diff
Add equipes de saude table resources
parent
0f64f8dd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Unify_States.sql
+38
-0
38 additions, 0 deletions
Unify_States.sql
esf_quilombolas.sql
+45
-0
45 additions, 0 deletions
esf_quilombolas.sql
with
83 additions
and
0 deletions
Unify_States.sql
0 → 100644
+
38
−
0
View file @
663f54ff
--
--Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
--Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
--
--This file is part of SMPPIR-Tables.
--
--SMPPIR-Tables is free software: you can redistribute it and/or modify
--it under the terms of the GNU General Public License as published by
--the Free Software Foundation, either version 3 of the License, or
--(at your option) any later version.
--
--SMPPIR-Tables is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--GNU General Public License for more details.
--
--You should have received a copy of the GNU General Public License
--along with SMPPIR-Tables. If not, see <https://www.gnu.org/licenses/>.
--
CREATE
TABLE
Brasil
AS
SELECT
regiao
.
id
AS
regiao_id
,
regiao
.
nome
AS
nome_regiao
,
estado
.
id
AS
estado_id
,
estado
.
nome
AS
nome_estado
,
estado
.
sigla
AS
sigla_estado
,
municipio
.
id
AS
municipio_id
,
municipio
.
nome
AS
nome_municipio
FROM
regiao
,
estado
,
municipio
WHERE
regiao
.
id
=
estado
.
regiao_id
AND
estado
.
id
=
municipio
.
estado_id
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
esf_quilombolas.sql
0 → 100644
+
45
−
0
View file @
663f54ff
--
--Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
--Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
--
--This file is part of SMPPIR-Tables.
--
--SMPPIR-Tables is free software: you can redistribute it and/or modify
--it under the terms of the GNU General Public License as published by
--the Free Software Foundation, either version 3 of the License, or
--(at your option) any later version.
--
--SMPPIR-Tables is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--GNU General Public License for more details.
--
--You should have received a copy of the GNU General Public License
--along with SMPPIR-Tables. If not, see <https://www.gnu.org/licenses/>.
--
CREATE
TABLE
esf_quilombolas
AS
SELECT
brasil
.
municipio_id
AS
municipio_id
,
brasil
.
nome_municipio
AS
nome_municipio
,
brasil
.
estado_id
AS
estado_id
,
brasil
.
sigla_estado
AS
sigla_estado
,
brasil
.
nome_estado
AS
nome_estado
,
brasil
.
regiao_id
AS
regiao_id
,
brasil
.
nome_regiao
AS
nome_regiao
,
equipes_saude
.
cod_municipio
AS
id_municipio_equipes
,
equipes_saude
.
no_referencia
AS
nome_equipe
,
equipes_saude
.
ano_censo
AS
ano_censo
FROM
(
SELECT
municipio_id
AS
id
,
(
municipio_id
/
10
)
AS
id_6
FROM
brasil
)
AS
novo_id
,
equipes_saude
,
brasil
WHERE
novo_id
.
id
=
brasil
.
municipio_id
AND
equipes_saude
.
cod_municipio
=
novo_id
.
id_6
AND
equipes_saude
.
tp_pop_assist_quilomb
=
1
ORDER
BY
equipes_saude
.
ano_censo
,
brasil
.
regiao_id
,
brasil
.
estado_id
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
jvfpw18
@jvfpw18
mentioned in commit
bc62275e
·
6 years ago
mentioned in commit
bc62275e
mentioned in commit bc62275e4fa4f299eb1cc335d67cf0a1b327cd0c
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment