child
Y
Normal
/
N
1000
100
-
2024/08/15 14:02:51.713
-
2024/08/15 14:02:51.713
H4sIAAAAAAAAAAMAAAAAAAAAAAA=
N
Table input
Table output
Y
Table input
TableInput
Y
1
none
ervu_person_registry
with child as
(select jsonb_array_elements(ri.info->'svedDeti'->'rebenok') ch,
ri.recruit_id
from public.recruits_info ri
where jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array')
select
r.id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->'dataRozhdDok'->>'nomerZapis' birth_az_number
from public.recruits r
join child on r.id = child.recruit_id
0
N
N
N
208
208
Y
Table output
TableOutput
Y
1
none
ervu-dashboard
ervu_dashboard
1000
N
N
Y
N
N
N
Y
N
Y
N
416
208
Y