Skip to content

Commit

Permalink
adding some more columns
Browse files Browse the repository at this point in the history
  • Loading branch information
patriciacatandi committed Sep 20, 2024
1 parent 6c15ca2 commit 5f0e2ce
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ SELECT
id_sabe_ler_escrever,
escola_nao_tem_inep,
frequenta_escola,
data_particao
FROM `rj-smas.protecao_social_cadunico.escolaridade`
where data_particao >= "2024-07-01"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE OR REPLACE TABLE `rj-smas-dev-432320.protecao_social_cadunico.identificacao_controle` AS
SELECT
id_familia,
condicao_cadastro,
estado_cadastro,
data_alteracao,
data_atualizacao,
data_catrastro,
data_particao,
FROM `rj-smas.protecao_social_cadunico.identificacao_controle`
where data_particao >= "2024-07-01"
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ with raw_table AS
data_particao
FROM `rj-smas.protecao_social_cadunico.identificacao_membro`
WHERE data_particao = "2024-07-01"
AND id_estado_cadastral != "4"
)
SELECT
* EXCEPT(idade),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ with raw_table AS
id_sexo,
DATE_DIFF(CURRENT_DATE, CAST(data_nascimento AS DATE), YEAR) idade,
trabalho_infantil,
id_parentesco_responsavel_familia,
parentesco_responsavel_familia,
id_estado_cadastral,
estado_cadastral,
data_particao
FROM `rj-smas.protecao_social_cadunico.identificacao_primeira_pessoa`
WHERE data_particao = "2024-06-15"
AND id_estado_cadastral != "4"
WHERE data_particao >= "2024-07-01"
-- AND id_estado_cadastral != "4"
)
SELECT
* EXCEPT(idade),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ SELECT
deficiencia_surdez_leve,
deficiencia_surdez_profunda,
deficiencia_transtorno_mental,
data_particao
FROM `rj-smas.protecao_social_cadunico.pessoa_deficiencia`
where data_particao >= "2024-07-01"

0 comments on commit 5f0e2ce

Please sign in to comment.