LOAD_DATErecording_date=waiting_registrationwaiting_countY"waiting_registration_M"male_countY"waiting_registration_W"female_countYmobilization_criterionmobilization_criterionYvolunteer_criterionvolunteer_criterionYcontract_criterioncontract_criterionYmobilization_criterion_percentmobilization_criterion_percentYvolunteer_criterion_percentvolunteer_criterion_percentYcontract_criterion_percentcontract_criterion_percentYtestrecruitment_idrecruitment_idYrecording_dateLOAD_DATEN6241888YSelect valuesSelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse400192YSelect values 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse40080YSelect values 2 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse400688YSelect values 2 2 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse4001200YSelect values 2 2 2 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse4001792YSelect values 3SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse400304YSelect values 3 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse400848YSelect values 3 2 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse4001392YSelect values 3 2 2 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse4001984YSelect values 4SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse416400YSelect values 4 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse416464YSelect values 4 3SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse416928YSelect values 4 3 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse416992YSelect values 4 3 3SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse4161472YSelect values 4 3 3 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse4161536YSelect values 4 3 3 3SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse4162080YSelect values 4 3 3 3 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse4162144YSelect values 5SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse400768YSelect values 5 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse4001296YSelect values 5 2 2SelectValuesY1noneNLOAD_DATELOAD_DATEDate-2-2yyyy-MM-ddfalsefalse4001888YTable input (appeal_document) РФTableInputY1nonepostgres.appeal-document-servicewith
t1 as (select count(*) as total_appeals from
public.appeal_document ad),
t2 as (select (avg(trim(both '"' from (ad.extra_info -> 'resultDate')::text)::date - appeal_date)) as average_consideration from public.appeal_document ad)
select t1.total_appeals, t2.average_consideration, '76e40191-adc7-4f03-84a4-0c29c44961a6' as recruitment_id,
0 as resolved, 1 as average_rating, 0 as average_to_face, 0 as average_epgu, 0 as average_to_face_percent, 0 as average_epgu_percent
from t1 full outer join t2 on 1 = 10NNN144304YTable input (appeal_document) липецкTableInputY1nonepostgres.appeal-document-servicewith
t1 as (select count(*) as total_appeals from public.appeal_document ad where vk_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'),
t2 as (select (avg(trim(both '"' from (ad.extra_info -> 'resultDate')::text)::date - appeal_date)) as average_consideration from public.appeal_document ad where vk_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509')
select t1.total_appeals, t2.average_consideration, '794ed0fa-a25b-4858-b89e-815bb391f2b5' as recruitment_id,
0 as resolved, 0 as average_rating, 0 as average_to_face, 0 as average_epgu, 0 as average_to_face_percent, 0 as average_epgu_percent
from t1 full outer join t2 on 1 = 10NNN144848YTable input (appeal_document) рязаньTableInputY1nonepostgres.appeal-document-servicewith
t1 as (select count(*) as total_appeals from public.appeal_document ad where vk_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'),
t2 as (select (avg(trim(both '"' from (ad.extra_info -> 'resultDate')::text)::date - appeal_date)) as average_consideration from public.appeal_document ad where vk_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c')
select t1.total_appeals, t2.average_consideration, 'd2e839ef-933c-48df-9a3a-ac1c00663154' as recruitment_id,
0 as resolved, 0 as average_rating, 0 as average_to_face, 0 as average_epgu, 0 as average_to_face_percent, 0 as average_epgu_percent
from t1 full outer join t2 on 1 = 10NNN1441392YTable input (appeal_document) сахалинTableInputY1nonepostgres.appeal-document-servicewith
t1 as (select count(*) as total_appeals from public.appeal_document ad where vk_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'),
t2 as (select (avg(trim(both '"' from (ad.extra_info -> 'resultDate')::text)::date - appeal_date)) as average_consideration from public.appeal_document ad where vk_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e')
select t1.total_appeals, t2.average_consideration, '6b56f46a-16e7-4c0f-83a8-05fbddf2e6cb' as recruitment_id,
0 as resolved, 0 as average_rating, 0 as average_to_face, 0 as average_epgu, 0 as average_to_face_percent, 0 as average_epgu_percent
from t1 full outer join t2 on 1 = 10NNN1441984YTable input (person_registry) РФTableInputY1nonepostgres.person_registrywith
t1 as (select count(*) total_count from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true'),
t2 as (select count(*) filter(where gender='MALE') male_count
from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true'),
t3 as (select count(*) filter(where gender='FEMALE') female_count
from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true')
select t1.total_count, t2.male_count, t3.female_count, '76e40191-adc7-4f03-84a4-0c29c44961a6' as recruitment_id,
0 as mobilization_criterion, 0 as volunteer_criterion, 0 as contract_criterion, 0 as mobilization_criterion_percent, 0 as volunteer_criterion_percent, 0 as contract_criterion_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 10NNN14480YTable input (person_registry) липецкTableInputY1nonepostgres.person_registrywith
t1 as (select count(*) total_count from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true' and target_recruitment_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'),
t2 as (select count(*) filter(where gender='MALE') male_count
from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true' and target_recruitment_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'),
t3 as (select count(*) filter(where gender='FEMALE') female_count
from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true' and target_recruitment_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509')
select t1.total_count, t2.male_count, t3.female_count, '794ed0fa-a25b-4858-b89e-815bb391f2b5' as recruitment_id,
0 as mobilization_criterion, 0 as volunteer_criterion, 0 as contract_criterion, 0 as mobilization_criterion_percent, 0 as volunteer_criterion_percent, 0 as contract_criterion_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 10NNN144688YTable input (person_registry) рязаньTableInputY1nonepostgres.person_registrywith
t1 as (select count(*) total_count from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true' and target_recruitment_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'),
t2 as (select count(*) filter(where gender='MALE') male_count
from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true' and target_recruitment_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'),
t3 as (select count(*) filter(where gender='FEMALE') female_count
from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true' and target_recruitment_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c')
select t1.total_count, t2.male_count, t3.female_count, 'd2e839ef-933c-48df-9a3a-ac1c00663154' as recruitment_id,
0 as mobilization_criterion, 0 as volunteer_criterion, 0 as contract_criterion, 0 as mobilization_criterion_percent, 0 as volunteer_criterion_percent, 0 as contract_criterion_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 10NNN1441200YTable input (person_registry) сахалинTableInputY1nonepostgres.person_registrywith
t1 as (select count(*) total_count from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true' and target_recruitment_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'),
t2 as (select count(*) filter(where gender='MALE') male_count
from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true' and target_recruitment_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'),
t3 as (select count(*) filter(where gender='FEMALE') female_count
from public.recruits r
where r.vu_current_info -> 'isMilitaryRegistered' = 'true' and target_recruitment_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e')
select t1.total_count, t2.male_count, t3.female_count, '6b56f46a-16e7-4c0f-83a8-05fbddf2e6cb' as recruitment_id,
0 as mobilization_criterion, 0 as volunteer_criterion, 0 as contract_criterion, 0 as mobilization_criterion_percent, 0 as volunteer_criterion_percent, 0 as contract_criterion_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 10NNN1441792YTable input (subpoena) РФ/веснаTableInputY1nonepostgres.subpoenawith
t1 as (select count(distinct subpoena.id) as subpoenas_sent FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='3'),
t2 as (select count(distinct subpoena.id) as appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code in ('4.1','4.2')),
t3 as (select count(distinct subpoena.id) as not_appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='5')
select t1.subpoenas_sent, t2.appeared_on_subpoenas, t3.not_appeared_on_subpoenas, 1 as org, '76e40191-adc7-4f03-84a4-0c29c44961a6' as recruitment_id, 'Весна' as spring_autumn,
0 as new_recruits, 0 as postponement_have_right, 0 as postponement_granted, 0 as appeared_on_subpoenas_percent, 0 as not_appeared_on_subpoenas_percent, 0 as postponement_have_right_percent, 0 as postponement_granted_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1
0NNN144464YTable input (subpoena) РФ/осеньTableInputY1nonepostgres.subpoenawith
t1 as (select count(distinct subpoena.id) as subpoenas_sent FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='3'),
t2 as (select count(distinct subpoena.id) as appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code in ('4.1','4.2')),
t3 as (select count(distinct subpoena.id) as not_appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='5')
select t1.subpoenas_sent, t2.appeared_on_subpoenas, t3.not_appeared_on_subpoenas, 1 as org, '76e40191-adc7-4f03-84a4-0c29c44961a6' as recruitment_id, 'Осень' as spring_autumn,
0 as new_recruits, 0 as postponement_have_right, 0 as postponement_granted, 0 as appeared_on_subpoenas_percent, 0 as not_appeared_on_subpoenas_percent, 0 as postponement_have_right_percent, 0 as postponement_granted_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1
0NNN144400YTable input (subpoena) липецк/веснаTableInputY1nonepostgres.subpoenawith
t1 as (select count(distinct subpoena.id) as subpoenas_sent FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='3' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'),
t2 as (select count(distinct subpoena.id) as appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code in ('4.1','4.2') and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'),
t3 as (select count(distinct subpoena.id) as not_appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509')
select t1.subpoenas_sent, t2.appeared_on_subpoenas, t3.not_appeared_on_subpoenas, 1 as org, '794ed0fa-a25b-4858-b89e-815bb391f2b5' as recruitment_id, 'Весна' as spring_autumn,
0 as new_recruits, 0 as postponement_have_right, 0 as postponement_granted, 0 as appeared_on_subpoenas_percent, 0 as not_appeared_on_subpoenas_percent, 0 as postponement_have_right_percent, 0 as postponement_granted_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1
0NNN144992YTable input (subpoena) липецк/осеньTableInputY1nonepostgres.subpoenawith
t1 as (select count(distinct subpoena.id) as subpoenas_sent FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='3' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'),
t2 as (select count(distinct subpoena.id) as appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code in ('4.1','4.2') and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'),
t3 as (select count(distinct subpoena.id) as not_appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509')
select t1.subpoenas_sent, t2.appeared_on_subpoenas, t3.not_appeared_on_subpoenas, 1 as org, '794ed0fa-a25b-4858-b89e-815bb391f2b5' as recruitment_id, 'Осень' as spring_autumn,
0 as new_recruits, 0 as postponement_have_right, 0 as postponement_granted, 0 as appeared_on_subpoenas_percent, 0 as not_appeared_on_subpoenas_percent, 0 as postponement_have_right_percent, 0 as postponement_granted_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1
0NNN144928YTable input (subpoena) рязань/веснаTableInputY1nonepostgres.subpoenawith
t1 as (select count(distinct subpoena.id) as subpoenas_sent FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='3' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'),
t2 as (select count(distinct subpoena.id) as appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code in ('4.1','4.2') and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'),
t3 as (select count(distinct subpoena.id) as not_appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c')
select t1.subpoenas_sent, t2.appeared_on_subpoenas, t3.not_appeared_on_subpoenas, 1 as org, 'd2e839ef-933c-48df-9a3a-ac1c00663154' as recruitment_id, 'Весна' as spring_autumn,
0 as new_recruits, 0 as postponement_have_right, 0 as postponement_granted, 0 as appeared_on_subpoenas_percent, 0 as not_appeared_on_subpoenas_percent, 0 as postponement_have_right_percent, 0 as postponement_granted_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1
0NNN1441536YTable input (subpoena) рязань/осеньTableInputY1nonepostgres.subpoenawith
t1 as (select count(distinct subpoena.id) as subpoenas_sent FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='3' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'),
t2 as (select count(distinct subpoena.id) as appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code in ('4.1','4.2') and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'),
t3 as (select count(distinct subpoena.id) as not_appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c')
select t1.subpoenas_sent, t2.appeared_on_subpoenas, t3.not_appeared_on_subpoenas, 1 as org, 'd2e839ef-933c-48df-9a3a-ac1c00663154' as recruitment_id, 'Осень' as spring_autumn,
0 as new_recruits, 0 as postponement_have_right, 0 as postponement_granted, 0 as appeared_on_subpoenas_percent, 0 as not_appeared_on_subpoenas_percent, 0 as postponement_have_right_percent, 0 as postponement_granted_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1
0NNN1441472YTable input (subpoena) сахалин/веснаTableInputY1nonepostgres.subpoenawith
t1 as (select count(distinct subpoena.id) as subpoenas_sent FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='3' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'),
t2 as (select count(distinct subpoena.id) as appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code in ('4.1','4.2') and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'),
t3 as (select count(distinct subpoena.id) as not_appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e')
select t1.subpoenas_sent, t2.appeared_on_subpoenas, t3.not_appeared_on_subpoenas, 1 as org, '6b56f46a-16e7-4c0f-83a8-05fbddf2e6cb' as recruitment_id, 'Весна' as spring_autumn,
0 as new_recruits, 0 as postponement_have_right, 0 as postponement_granted, 0 as appeared_on_subpoenas_percent, 0 as not_appeared_on_subpoenas_percent, 0 as postponement_have_right_percent, 0 as postponement_granted_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1
0NNN1442144YTable input (subpoena) сахалин/осеньTableInputY1nonepostgres.subpoenawith
t1 as (select count(distinct subpoena.id) as subpoenas_sent FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='3' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'),
t2 as (select count(distinct subpoena.id) as appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code in ('4.1','4.2') and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'),
t3 as (select count(distinct subpoena.id) as not_appeared_on_subpoenas FROM subpoena
JOIN subpoena_history ON subpoena_history.subpoena_id = subpoena.id
JOIN subpoena_status AS sub_status ON sub_status.id = subpoena.status_id
JOIN subpoena_status AS sub_stat_hist ON sub_stat_hist.id = subpoena_history.status_id
JOIN subpoena_reason ON subpoena_reason.id = subpoena.reason_id
where subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e')
select t1.subpoenas_sent, t2.appeared_on_subpoenas, t3.not_appeared_on_subpoenas, 1 as org, '6b56f46a-16e7-4c0f-83a8-05fbddf2e6cb' as recruitment_id, 'Осень' as spring_autumn,
0 as new_recruits, 0 as postponement_have_right, 0 as postponement_granted, 0 as appeared_on_subpoenas_percent, 0 as not_appeared_on_subpoenas_percent, 0 as postponement_have_right_percent, 0 as postponement_granted_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1
0NNN1442080YTable input 2 (person_registry) РФTableInputY1nonepostgres.person_registrywith
t1 as (select count(*) waiting_count from public.recruits r where r.system_pgs_status = '1'),
t2 as (select count(*) filter(where gender='MALE') male_count from public.recruits r where r.system_pgs_status = '1'),
t3 as (select count(*) filter(where gender='FEMALE') female_count from public.recruits r where r.system_pgs_status = '1')
select t1.waiting_count, t2.male_count, t3.female_count, '76e40191-adc7-4f03-84a4-0c29c44961a6' as recruitment_id,
0 as mobilization_criterion, 0 as volunteer_criterion, 0 as contract_criterion, 0 as mobilization_criterion_percent, 0 as volunteer_criterion_percent, 0 as contract_criterion_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 10NNN144192YTable input 2 (person_registry) липецкTableInputY1nonepostgres.person_registrywith
t1 as (select count(*) waiting_count from public.recruits r where r.system_pgs_status = '1' and target_recruitment_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'),
t2 as (select count(*) filter(where gender='MALE') male_count from public.recruits r where r.system_pgs_status = '1' and target_recruitment_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'),
t3 as (select count(*) filter(where gender='FEMALE') female_count from public.recruits r where r.system_pgs_status = '1' and target_recruitment_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509')
select t1.waiting_count, t2.male_count, t3.female_count, '794ed0fa-a25b-4858-b89e-815bb391f2b5' as recruitment_id,
0 as mobilization_criterion, 0 as volunteer_criterion, 0 as contract_criterion, 0 as mobilization_criterion_percent, 0 as volunteer_criterion_percent, 0 as contract_criterion_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 10NNN144768YTable input 2 (person_registry) рязаньTableInputY1nonepostgres.person_registrywith
t1 as (select count(*) waiting_count from public.recruits r where r.system_pgs_status = '1' and target_recruitment_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'),
t2 as (select count(*) filter(where gender='MALE') male_count from public.recruits r where r.system_pgs_status = '1' and target_recruitment_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'),
t3 as (select count(*) filter(where gender='FEMALE') female_count from public.recruits r where r.system_pgs_status = '1' and target_recruitment_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c')
select t1.waiting_count, t2.male_count, t3.female_count, 'd2e839ef-933c-48df-9a3a-ac1c00663154' as recruitment_id,
0 as mobilization_criterion, 0 as volunteer_criterion, 0 as contract_criterion, 0 as mobilization_criterion_percent, 0 as volunteer_criterion_percent, 0 as contract_criterion_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 10NNN1441296YTable input 2 (person_registry) сахалинTableInputY1nonepostgres.person_registrywith
t1 as (select count(*) waiting_count from public.recruits r where r.system_pgs_status = '1' and target_recruitment_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'),
t2 as (select count(*) filter(where gender='MALE') male_count from public.recruits r where r.system_pgs_status = '1' and target_recruitment_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'),
t3 as (select count(*) filter(where gender='FEMALE') female_count from public.recruits r where r.system_pgs_status = '1' and target_recruitment_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e')
select t1.waiting_count, t2.male_count, t3.female_count, '6b56f46a-16e7-4c0f-83a8-05fbddf2e6cb' as recruitment_id,
0 as mobilization_criterion, 0 as volunteer_criterion, 0 as contract_criterion, 0 as mobilization_criterion_percent, 0 as volunteer_criterion_percent, 0 as contract_criterion_percent
from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 10NNN1441888YN