total_registered.marital_status
Y
Normal
0
N
1000
100
-
2024/08/02 11:56:22.507
-
2024/08/02 11:56:22.507
Get variables 2 2
Select values 2 2
Y
Table input (person_registry) РФ/все
Get variables 2 2
Y
Select values 2 2
Insert / update (total_registered.marital_status)
Y
Execute SQL script
Table input (person_registry) РФ/все
Y
Execute SQL script
ExecSql
N
1
none
ervu-dashboard
N
N
Y
N
N
DELETE FROM total_registered.marital_status
WHERE recording_date = current_date
AND schema = 'Ministry'
AND recruitment_id = '${REG_ID}'
352
272
Get variables 2 2
GetVariable
Y
1
none
-1
REG_ID
-1
none
String
-1
VK_ARRAY
-1
none
String
880
272
Insert / update (total_registered.marital_status)
InsertUpdate
Y
1
none
100
ervu-dashboard
=
recruitment_id
REG_ID
=
"all_M_W"
gender
=
schema
schema
=
convicts
convicts
total_registered
married
married
Y
not_married
not_married
Y
married_percent
married_percent
Y
not_married_percent
not_married_percent
Y
"all_M_W"
gender
N
recruitment_id
recruitment_id
N
marital_status
total
Y
schema
schema
N
convicts
convicts
N
other
other
Y
other_percent
other_percent
Y
Y
1392
272
Select values 2 2
SelectValues
Y
1
none
N
REG_ID
REG_ID
String
-2
-2
false
false
VK_ARRAY
VK_ARRAY
String
-2
-2
false
false
1088
272
Table input (person_registry) РФ/все
TableInput
Y
1
none
ervu-dashboard
N
0
SELECT
COALESCE(SUM(married), 0) married,
COALESCE(SUM(not_married), 0) not_married,
COALESCE(SUM(other), 0) other,
COALESCE(
CASE
WHEN SUM(marital_status) > 0
THEN ROUND((SUM(married) / SUM(marital_status) * 100), 2)
ELSE 0
END,
0
) married_percent,
COALESCE(
CASE
WHEN SUM(marital_status) > 0
THEN ROUND((SUM(not_married) / SUM(marital_status) * 100), 2)
ELSE 0
END,
0
) not_married_percent,
COALESCE(
CASE
WHEN SUM(marital_status) > 0
THEN ROUND((SUM(other) / SUM(marital_status) * 100), 2)
ELSE 0
END,
0
) other_percent,
COALESCE(SUM(marital_status), 0) total,
'${REG_ID}' AS recruitment_id,
"all_M_W" AS gender,
convicts,
'Ministry' AS schema
FROM total_registered.marital_status
WHERE recruitment_id = ANY ('${VK_ARRAY}')
AND schema = 'Region'
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W", convicts;
Y
608
272