recruitment Normal 0 / LOAD_DATE 20240809 ID_BATCH Y ID_BATCH CHANNEL_ID Y CHANNEL_ID TRANSNAME Y TRANSNAME STATUS Y STATUS LINES_READ Y LINES_READ LINES_WRITTEN Y LINES_WRITTEN LINES_UPDATED Y LINES_UPDATED LINES_INPUT Y LINES_INPUT LINES_OUTPUT Y LINES_OUTPUT LINES_REJECTED Y LINES_REJECTED ERRORS Y ERRORS STARTDATE Y STARTDATE ENDDATE Y ENDDATE LOGDATE Y LOGDATE DEPDATE Y DEPDATE REPLAYDATE Y REPLAYDATE LOG_FIELD Y LOG_FIELD EXECUTING_SERVER N EXECUTING_SERVER EXECUTING_USER N EXECUTING_USER CLIENT N CLIENT
ID_BATCH Y ID_BATCH SEQ_NR Y SEQ_NR LOGDATE Y LOGDATE TRANSNAME Y TRANSNAME STEPNAME Y STEPNAME STEP_COPY Y STEP_COPY LINES_READ Y LINES_READ LINES_WRITTEN Y LINES_WRITTEN LINES_UPDATED Y LINES_UPDATED LINES_INPUT Y LINES_INPUT LINES_OUTPUT Y LINES_OUTPUT LINES_REJECTED Y LINES_REJECTED ERRORS Y ERRORS INPUT_BUFFER_ROWS Y INPUT_BUFFER_ROWS OUTPUT_BUFFER_ROWS Y OUTPUT_BUFFER_ROWS
ID_BATCH Y ID_BATCH CHANNEL_ID Y CHANNEL_ID LOG_DATE Y LOG_DATE LOGGING_OBJECT_TYPE Y LOGGING_OBJECT_TYPE OBJECT_NAME Y OBJECT_NAME OBJECT_COPY Y OBJECT_COPY REPOSITORY_DIRECTORY Y REPOSITORY_DIRECTORY FILENAME Y FILENAME OBJECT_ID Y OBJECT_ID OBJECT_REVISION Y OBJECT_REVISION PARENT_CHANNEL_ID Y PARENT_CHANNEL_ID ROOT_CHANNEL_ID Y ROOT_CHANNEL_ID
ID_BATCH Y ID_BATCH CHANNEL_ID Y CHANNEL_ID LOG_DATE Y LOG_DATE TRANSNAME Y TRANSNAME STEPNAME Y STEPNAME STEP_COPY Y STEP_COPY LINES_READ Y LINES_READ LINES_WRITTEN Y LINES_WRITTEN LINES_UPDATED Y LINES_UPDATED LINES_INPUT Y LINES_INPUT LINES_OUTPUT Y LINES_OUTPUT LINES_REJECTED Y LINES_REJECTED ERRORS Y ERRORS LOG_FIELD N LOG_FIELD
ID_BATCH Y ID_BATCH CHANNEL_ID Y CHANNEL_ID LOG_DATE Y LOG_DATE METRICS_DATE Y METRICS_DATE METRICS_CODE Y METRICS_CODE METRICS_DESCRIPTION Y METRICS_DESCRIPTION METRICS_SUBJECT Y METRICS_SUBJECT METRICS_TYPE Y METRICS_TYPE METRICS_VALUE Y METRICS_VALUE
0.0 0.0 10000 50 50 N Y 50000 Y N 1000 100 - 2024/08/09 13:13:59.825 - 2024/08/09 13:13:59.825 H4sIAAAAAAAAAAMAAAAAAAAAAAA= N ervu_business_metrics 10.10.31.119 POSTGRESQL Native ervu-dashboard 5432 ervu-dashboard Encrypted 2be98caba1cd2df80aa0aa672d193bdde PORT_NUMBER 5432 postgres.subpoena 10.10.31.118 POSTGRESQL Native subpoena 5432 postgres Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb PORT_NUMBER 5432 Get variables 4 Select values 4 Y Select values 4 Insert / update (recruitment_campaign.subpoenas) Y Table input (subpoena) осень/РФ Get variables 4 Y Get variables 4 2 Select values 4 2 Y Select values 4 2 Insert / update (recruitment_campaign.subpoenas) 2 Y Table input (subpoena) Весна/РФ Get variables 4 2 Y Get variables 4 3 Select values 4 3 Y Select values 4 3 Insert / update (recruitment_campaign.subpoenas) 3 Y Table input (subpoena) осень/липец Get variables 4 3 Y Get variables 4 3 2 Select values 4 3 2 Y Select values 4 3 2 Insert / update (recruitment_campaign.subpoenas) 3 2 Y Table input (subpoena) весна/липец 2 Get variables 4 3 2 Y Get variables 4 4 Select values 4 4 Y Select values 4 4 Insert / update (recruitment_campaign.subpoenas) 4 Y Table input (subpoena) осень/ряз Get variables 4 4 Y Get variables 4 4 2 Select values 4 4 2 Y Select values 4 4 2 Insert / update (recruitment_campaign.subpoenas) 4 2 Y Table input (subpoena) весна/ряз Get variables 4 4 2 Y Get variables 4 5 Select values 4 5 Y Select values 4 5 Insert / update (recruitment_campaign.subpoenas) 5 Y Table input (subpoena) осень/сахал Get variables 4 5 Y Get variables 4 5 2 Select values 4 5 2 Y Select values 4 5 2 Insert / update (recruitment_campaign.subpoenas) 5 2 Y Table input (subpoena) весна/сахал 2 Get variables 4 5 2 Y Get variables 4 GetVariable Y 1 none LOAD_DATE ${LOAD_DATE} Date yyyyMMdd -1 -1 none 336 128 Y Get variables 4 2 GetVariable Y 1 none LOAD_DATE ${LOAD_DATE} Date yyyyMMdd -1 -1 none 336 240 Y Get variables 4 3 GetVariable Y 1 none LOAD_DATE ${LOAD_DATE} Date yyyyMMdd -1 -1 none 336 400 Y Get variables 4 3 2 GetVariable Y 1 none LOAD_DATE ${LOAD_DATE} Date yyyyMMdd -1 -1 none 336 480 Y Get variables 4 4 GetVariable Y 1 none LOAD_DATE ${LOAD_DATE} Date yyyyMMdd -1 -1 none 336 608 Y Get variables 4 4 2 GetVariable Y 1 none LOAD_DATE ${LOAD_DATE} Date yyyyMMdd -1 -1 none 336 688 Y Get variables 4 5 GetVariable Y 1 none LOAD_DATE ${LOAD_DATE} Date yyyyMMdd -1 -1 none 336 816 Y Get variables 4 5 2 GetVariable Y 1 none LOAD_DATE ${LOAD_DATE} Date yyyyMMdd -1 -1 none 336 896 Y Insert / update (recruitment_campaign.subpoenas) InsertUpdate Y 1 none ervu_business_metrics 100 N recruitment_campaign
subpoenas
LOAD_DATE recording_date = subpoena subpoena Y appeared appeared Y not_appeared not_appeared Y not_ap_good_reason not_ap_good_reason Y introduced_measures introduced_measures Y ap_not_required ap_not_required Y restrictions_applied restrictions_applied Y appeared_percent appeared_percent Y not_appeared_percent not_appeared_percent Y not_ap_good_reason_percent not_ap_good_reason_percent Y ap_not_required_percent ap_not_required_percent Y restrictions_applied_percent restrictions_applied_percent Y introduced_measures_percent introduced_measures_percent Y testrecruitment_id recruitment_id Y rest rest N testspring_autumn spring_autumn N recording_date LOAD_DATE N 656 128 Y Insert / update (recruitment_campaign.subpoenas) 2 InsertUpdate Y 1 none ervu_business_metrics 100 N recruitment_campaign subpoenas
LOAD_DATE recording_date = subpoena subpoena Y appeared appeared Y not_appeared not_appeared Y not_ap_good_reason not_ap_good_reason Y introduced_measures introduced_measures Y ap_not_required ap_not_required Y restrictions_applied restrictions_applied Y appeared_percent appeared_percent Y not_appeared_percent not_appeared_percent Y not_ap_good_reason_percent not_ap_good_reason_percent Y ap_not_required_percent ap_not_required_percent Y restrictions_applied_percent restrictions_applied_percent Y introduced_measures_percent introduced_measures_percent Y testrecruitment_id recruitment_id Y rest rest N testspring_autumn spring_autumn N recording_date LOAD_DATE N
656 240 Y
Insert / update (recruitment_campaign.subpoenas) 3 InsertUpdate Y 1 none ervu_business_metrics 100 N recruitment_campaign subpoenas
LOAD_DATE recording_date = subpoena subpoena Y appeared appeared Y not_appeared not_appeared Y not_ap_good_reason not_ap_good_reason Y introduced_measures introduced_measures Y ap_not_required ap_not_required Y restrictions_applied restrictions_applied Y appeared_percent appeared_percent Y not_appeared_percent not_appeared_percent Y not_ap_good_reason_percent not_ap_good_reason_percent Y ap_not_required_percent ap_not_required_percent Y restrictions_applied_percent restrictions_applied_percent Y introduced_measures_percent introduced_measures_percent Y testrecruitment_id recruitment_id Y rest rest N testspring_autumn spring_autumn N recording_date LOAD_DATE N
656 400 Y
Insert / update (recruitment_campaign.subpoenas) 3 2 InsertUpdate Y 1 none ervu_business_metrics 100 N recruitment_campaign subpoenas
LOAD_DATE recording_date = subpoena subpoena Y appeared appeared Y not_appeared not_appeared Y not_ap_good_reason not_ap_good_reason Y introduced_measures introduced_measures Y ap_not_required ap_not_required Y restrictions_applied restrictions_applied Y appeared_percent appeared_percent Y not_appeared_percent not_appeared_percent Y not_ap_good_reason_percent not_ap_good_reason_percent Y ap_not_required_percent ap_not_required_percent Y restrictions_applied_percent restrictions_applied_percent Y introduced_measures_percent introduced_measures_percent Y testrecruitment_id recruitment_id Y rest rest N testspring_autumn spring_autumn N recording_date LOAD_DATE N
656 480 Y
Insert / update (recruitment_campaign.subpoenas) 4 InsertUpdate Y 1 none ervu_business_metrics 100 N recruitment_campaign subpoenas
LOAD_DATE recording_date = subpoena subpoena Y appeared appeared Y not_appeared not_appeared Y not_ap_good_reason not_ap_good_reason Y introduced_measures introduced_measures Y ap_not_required ap_not_required Y restrictions_applied restrictions_applied Y appeared_percent appeared_percent Y not_appeared_percent not_appeared_percent Y not_ap_good_reason_percent not_ap_good_reason_percent Y ap_not_required_percent ap_not_required_percent Y restrictions_applied_percent restrictions_applied_percent Y introduced_measures_percent introduced_measures_percent Y testrecruitment_id recruitment_id Y rest rest N testspring_autumn spring_autumn N recording_date LOAD_DATE N
656 608 Y
Insert / update (recruitment_campaign.subpoenas) 4 2 InsertUpdate Y 1 none ervu_business_metrics 100 N recruitment_campaign subpoenas
LOAD_DATE recording_date = subpoena subpoena Y appeared appeared Y not_appeared not_appeared Y not_ap_good_reason not_ap_good_reason Y introduced_measures introduced_measures Y ap_not_required ap_not_required Y restrictions_applied restrictions_applied Y appeared_percent appeared_percent Y not_appeared_percent not_appeared_percent Y not_ap_good_reason_percent not_ap_good_reason_percent Y ap_not_required_percent ap_not_required_percent Y restrictions_applied_percent restrictions_applied_percent Y introduced_measures_percent introduced_measures_percent Y testrecruitment_id recruitment_id Y rest rest N testspring_autumn spring_autumn N recording_date LOAD_DATE N
656 688 Y
Insert / update (recruitment_campaign.subpoenas) 5 InsertUpdate Y 1 none ervu_business_metrics 100 N recruitment_campaign subpoenas
LOAD_DATE recording_date = subpoena subpoena Y appeared appeared Y not_appeared not_appeared Y not_ap_good_reason not_ap_good_reason Y introduced_measures introduced_measures Y ap_not_required ap_not_required Y restrictions_applied restrictions_applied Y appeared_percent appeared_percent Y not_appeared_percent not_appeared_percent Y not_ap_good_reason_percent not_ap_good_reason_percent Y ap_not_required_percent ap_not_required_percent Y restrictions_applied_percent restrictions_applied_percent Y introduced_measures_percent introduced_measures_percent Y testrecruitment_id recruitment_id Y rest rest N testspring_autumn spring_autumn N recording_date LOAD_DATE N
656 816 Y
Insert / update (recruitment_campaign.subpoenas) 5 2 InsertUpdate Y 1 none ervu_business_metrics 100 N recruitment_campaign subpoenas
LOAD_DATE recording_date = subpoena subpoena Y appeared appeared Y not_appeared not_appeared Y not_ap_good_reason not_ap_good_reason Y introduced_measures introduced_measures Y ap_not_required ap_not_required Y restrictions_applied restrictions_applied Y appeared_percent appeared_percent Y not_appeared_percent not_appeared_percent Y not_ap_good_reason_percent not_ap_good_reason_percent Y ap_not_required_percent ap_not_required_percent Y restrictions_applied_percent restrictions_applied_percent Y introduced_measures_percent introduced_measures_percent Y testrecruitment_id recruitment_id Y rest rest N testspring_autumn spring_autumn N recording_date LOAD_DATE N
656 896 Y
Select values 4 SelectValues Y 1 none N LOAD_DATE LOAD_DATE Date -2 -2 yyyy-MM-dd false false mil_reg mil_reg Boolean -2 -2 false false normal 448 128 Y Select values 4 2 SelectValues Y 1 none N LOAD_DATE LOAD_DATE Date -2 -2 yyyy-MM-dd false false mil_reg mil_reg Boolean -2 -2 false false normal 448 240 Y Select values 4 3 SelectValues Y 1 none N LOAD_DATE LOAD_DATE Date -2 -2 yyyy-MM-dd false false mil_reg mil_reg Boolean -2 -2 false false normal 448 400 Y Select values 4 3 2 SelectValues Y 1 none N LOAD_DATE LOAD_DATE Date -2 -2 yyyy-MM-dd false false mil_reg mil_reg Boolean -2 -2 false false normal 448 480 Y Select values 4 4 SelectValues Y 1 none N LOAD_DATE LOAD_DATE Date -2 -2 yyyy-MM-dd false false mil_reg mil_reg Boolean -2 -2 false false normal 448 608 Y Select values 4 4 2 SelectValues Y 1 none N LOAD_DATE LOAD_DATE Date -2 -2 yyyy-MM-dd false false mil_reg mil_reg Boolean -2 -2 false false normal 448 688 Y Select values 4 5 SelectValues Y 1 none N LOAD_DATE LOAD_DATE Date -2 -2 yyyy-MM-dd false false mil_reg mil_reg Boolean -2 -2 false false normal 448 816 Y Select values 4 5 2 SelectValues Y 1 none N LOAD_DATE LOAD_DATE Date -2 -2 yyyy-MM-dd false false mil_reg mil_reg Boolean -2 -2 false false normal 448 896 Y Table input (subpoena) Весна/РФ TableInput Y 1 none postgres.subpoena with t1 as (select count(distinct subpoena.id) as subpoena 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 not subpoena_reason.type='3' and sub_stat_hist.code ='3'), t2 as (select count(distinct subpoena.id) as appeared 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 not subpoena_reason.type='3' and sub_stat_hist.code in ('4.1','4.2')), t3 as (select count(distinct subpoena.id) as not_appeared 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 not subpoena_reason.type='3' and sub_stat_hist.code ='5'), t4 as (select count(*) as not_ap_good_reason 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 not subpoena_reason.type='3' and sub_stat_hist.code='5.1'), t5 as (select count(distinct subpoena.id) as ap_not_required 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 not subpoena_reason.type='3' and sub_stat_hist.code in ('3.8','5.2')), t6 as (select count(distinct rdi.id) as restrictions_applied from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and subpoena_reason.type = '3'), t7 as (select count(distinct rdi.id) as introduced_measures from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and rdi.applied_date is not null and subpoena_reason.type = '3') select t1.subpoena, t2.appeared, t3.not_appeared, t4.not_ap_good_reason, t5.ap_not_required, t6.restrictions_applied, t7.introduced_measures, 1 as mil_reg, '76e40191-adc7-4f03-84a4-0c29c44961a6' as recruitment_id, 1 as org, 0 as appeared_percent, 0 as not_appeared_percent, 0 as not_ap_good_reason_percent, 0 as ap_not_required_percent, 0 as restrictions_applied_percent, 0 as introduced_measures_percent, 0 as rest, 'Весна' as spring_autumn from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1 full outer join t4 on 1 = 1 full outer join t5 on 1 = 1 full outer join t6 on 1 = 1 full outer join t7 on 1 = 1 0 N N N 176 240 Y Table input (subpoena) весна/липец 2 TableInput Y 1 none postgres.subpoena with t1 as (select count(distinct subpoena.id) as subpoena 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 not 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 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 not 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 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 not subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'), t4 as (select count(*) as not_ap_good_reason 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 not subpoena_reason.type='3' and sub_stat_hist.code='5.1' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'), t5 as (select count(distinct subpoena.id) as ap_not_required 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 not subpoena_reason.type='3' and sub_stat_hist.code in ('3.8','5.2') and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'), t6 as (select count(distinct rdi.id) as restrictions_applied from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and subpoena_reason.type = '3' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'), t7 as (select count(distinct rdi.id) as introduced_measures from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and rdi.applied_date is not null and subpoena_reason.type = '3' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509') select t1.subpoena, t2.appeared, t3.not_appeared, t4.not_ap_good_reason, t5.ap_not_required, t6.restrictions_applied, t7.introduced_measures, 1 as mil_reg, '794ed0fa-a25b-4858-b89e-815bb391f2b5' as recruitment_id, 1 as org, 0 as appeared_percent, 0 as not_appeared_percent, 0 as not_ap_good_reason_percent, 0 as ap_not_required_percent, 0 as restrictions_applied_percent, 0 as introduced_measures_percent, 0 as rest, 'Весна' as spring_autumn from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1 full outer join t4 on 1 = 1 full outer join t5 on 1 = 1 full outer join t6 on 1 = 1 full outer join t7 on 1 = 1 0 N N N 176 480 Y Table input (subpoena) весна/ряз TableInput Y 1 none postgres.subpoena with t1 as (select count(distinct subpoena.id) as subpoena 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 not 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 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 not 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 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 not subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'), t4 as (select count(*) as not_ap_good_reason 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 not subpoena_reason.type='3' and sub_stat_hist.code='5.1' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'), t5 as (select count(distinct subpoena.id) as ap_not_required 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 not subpoena_reason.type='3' and sub_stat_hist.code in ('3.8','5.2') and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'), t6 as (select count(distinct rdi.id) as restrictions_applied from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and subpoena_reason.type = '3' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'), t7 as (select count(distinct rdi.id) as introduced_measures from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and rdi.applied_date is not null and subpoena_reason.type = '3' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c') select t1.subpoena, t2.appeared, t3.not_appeared, t4.not_ap_good_reason, t5.ap_not_required, t6.restrictions_applied, t7.introduced_measures, 1 as mil_reg, 'd2e839ef-933c-48df-9a3a-ac1c00663154' as recruitment_id, 1 as org, 0 as appeared_percent, 0 as not_appeared_percent, 0 as not_ap_good_reason_percent, 0 as ap_not_required_percent, 0 as restrictions_applied_percent, 0 as introduced_measures_percent, 0 as rest, 'Весна' as spring_autumn from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1 full outer join t4 on 1 = 1 full outer join t5 on 1 = 1 full outer join t6 on 1 = 1 full outer join t7 on 1 = 1 0 N N N 176 688 Y Table input (subpoena) весна/сахал 2 TableInput Y 1 none postgres.subpoena with t1 as (select count(distinct subpoena.id) as subpoena 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 not 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 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 not 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 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 not subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'), t4 as (select count(*) as not_ap_good_reason 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 not subpoena_reason.type='3' and sub_stat_hist.code='5.1' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'), t5 as (select count(distinct subpoena.id) as ap_not_required 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 not subpoena_reason.type='3' and sub_stat_hist.code in ('3.8','5.2') and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'), t6 as (select count(distinct rdi.id) as restrictions_applied from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and subpoena_reason.type = '3' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'), t7 as (select count(distinct rdi.id) as introduced_measures from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and rdi.applied_date is not null and subpoena_reason.type = '3' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e') select t1.subpoena, t2.appeared, t3.not_appeared, t4.not_ap_good_reason, t5.ap_not_required, t6.restrictions_applied, t7.introduced_measures, 1 as mil_reg, '6b56f46a-16e7-4c0f-83a8-05fbddf2e6cb' as recruitment_id, 1 as org, 0 as appeared_percent, 0 as not_appeared_percent, 0 as not_ap_good_reason_percent, 0 as ap_not_required_percent, 0 as restrictions_applied_percent, 0 as introduced_measures_percent, 0 as rest, 'Весна' as spring_autumn from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1 full outer join t4 on 1 = 1 full outer join t5 on 1 = 1 full outer join t6 on 1 = 1 full outer join t7 on 1 = 1 0 N N N 176 896 Y Table input (subpoena) осень/РФ TableInput Y 1 none postgres.subpoena with t1 as (select count(distinct subpoena.id) as subpoena 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 not subpoena_reason.type='3' and sub_stat_hist.code ='3'), t2 as (select count(distinct subpoena.id) as appeared 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 not subpoena_reason.type='3' and sub_stat_hist.code in ('4.1','4.2')), t3 as (select count(distinct subpoena.id) as not_appeared 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 not subpoena_reason.type='3' and sub_stat_hist.code ='5'), t4 as (select count(*) as not_ap_good_reason 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 not subpoena_reason.type='3' and sub_stat_hist.code='5.1'), t5 as (select count(distinct subpoena.id) as ap_not_required 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 not subpoena_reason.type='3' and sub_stat_hist.code in ('3.8','5.2')), t6 as (select count(distinct rdi.id) as restrictions_applied from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and subpoena_reason.type = '3'), t7 as (select count(distinct rdi.id) as introduced_measures from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and rdi.applied_date is not null and subpoena_reason.type = '3') select t1.subpoena, t2.appeared, t3.not_appeared, t4.not_ap_good_reason, t5.ap_not_required, t6.restrictions_applied, t7.introduced_measures, 1 as mil_reg, '76e40191-adc7-4f03-84a4-0c29c44961a6' as recruitment_id, 1 as org, 0 as appeared_percent, 0 as not_appeared_percent, 0 as not_ap_good_reason_percent, 0 as ap_not_required_percent, 0 as restrictions_applied_percent, 0 as introduced_measures_percent, 0 as rest, 'Осень' as spring_autumn from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1 full outer join t4 on 1 = 1 full outer join t5 on 1 = 1 full outer join t6 on 1 = 1 full outer join t7 on 1 = 1 0 N N N 176 128 Y Table input (subpoena) осень/липец TableInput Y 1 none postgres.subpoena with t1 as (select count(distinct subpoena.id) as subpoena 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 not 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 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 not 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 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 not subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'), t4 as (select count(*) as not_ap_good_reason 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 not subpoena_reason.type='3' and sub_stat_hist.code='5.1' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'), t5 as (select count(distinct subpoena.id) as ap_not_required 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 not subpoena_reason.type='3' and sub_stat_hist.code in ('3.8','5.2') and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'), t6 as (select count(distinct rdi.id) as restrictions_applied from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and subpoena_reason.type = '3' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509'), t7 as (select count(distinct rdi.id) as introduced_measures from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and rdi.applied_date is not null and subpoena_reason.type = '3' and subpoena.department_id = '191e81ae-8f1d-495a-aee5-ec1f200ba509') select t1.subpoena, t2.appeared, t3.not_appeared, t4.not_ap_good_reason, t5.ap_not_required, t6.restrictions_applied, t7.introduced_measures, 1 as mil_reg, '794ed0fa-a25b-4858-b89e-815bb391f2b5' as recruitment_id, 1 as org, 0 as appeared_percent, 0 as not_appeared_percent, 0 as not_ap_good_reason_percent, 0 as ap_not_required_percent, 0 as restrictions_applied_percent, 0 as introduced_measures_percent, 0 as rest, 'Осень' as spring_autumn from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1 full outer join t4 on 1 = 1 full outer join t5 on 1 = 1 full outer join t6 on 1 = 1 full outer join t7 on 1 = 1 0 N N N 176 400 Y Table input (subpoena) осень/ряз TableInput Y 1 none postgres.subpoena with t1 as (select count(distinct subpoena.id) as subpoena 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 not 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 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 not 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 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 not subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'), t4 as (select count(*) as not_ap_good_reason 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 not subpoena_reason.type='3' and sub_stat_hist.code='5.1' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'), t5 as (select count(distinct subpoena.id) as ap_not_required 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 not subpoena_reason.type='3' and sub_stat_hist.code in ('3.8','5.2') and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'), t6 as (select count(distinct rdi.id) as restrictions_applied from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and subpoena_reason.type = '3' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c'), t7 as (select count(distinct rdi.id) as introduced_measures from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and rdi.applied_date is not null and subpoena_reason.type = '3' and subpoena.department_id = '1284964b-3bf8-41b5-adb5-c6d1ec1bc13c') select t1.subpoena, t2.appeared, t3.not_appeared, t4.not_ap_good_reason, t5.ap_not_required, t6.restrictions_applied, t7.introduced_measures, 1 as mil_reg, 'd2e839ef-933c-48df-9a3a-ac1c00663154' as recruitment_id, 1 as org, 0 as appeared_percent, 0 as not_appeared_percent, 0 as not_ap_good_reason_percent, 0 as ap_not_required_percent, 0 as restrictions_applied_percent, 0 as introduced_measures_percent, 0 as rest, 'Осень' as spring_autumn from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1 full outer join t4 on 1 = 1 full outer join t5 on 1 = 1 full outer join t6 on 1 = 1 full outer join t7 on 1 = 1 0 N N N 176 608 Y Table input (subpoena) осень/сахал TableInput Y 1 none postgres.subpoena with t1 as (select count(distinct subpoena.id) as subpoena 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 not 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 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 not 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 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 not subpoena_reason.type='3' and sub_stat_hist.code ='5' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'), t4 as (select count(*) as not_ap_good_reason 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 not subpoena_reason.type='3' and sub_stat_hist.code='5.1' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'), t5 as (select count(distinct subpoena.id) as ap_not_required 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 not subpoena_reason.type='3' and sub_stat_hist.code in ('3.8','5.2') and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'), t6 as (select count(distinct rdi.id) as restrictions_applied from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and subpoena_reason.type = '3' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e'), t7 as (select count(distinct rdi.id) as introduced_measures from restriction_document_item rdi join restriction_document on restriction_document.id = rdi.restriction_document_create_id join subpoena on subpoena.id = restriction_document.subpoena_id join subpoena_reason on subpoena_reason.id = subpoena.reason_id where rdi.restriction_document_cancel_id is null and rdi.applied_date is not null and subpoena_reason.type = '3' and subpoena.department_id = 'de265e31-4b82-4dc8-9bf6-af990d6d649e') select t1.subpoena, t2.appeared, t3.not_appeared, t4.not_ap_good_reason, t5.ap_not_required, t6.restrictions_applied, t7.introduced_measures, 1 as mil_reg, '6b56f46a-16e7-4c0f-83a8-05fbddf2e6cb' as recruitment_id, 1 as org, 0 as appeared_percent, 0 as not_appeared_percent, 0 as not_ap_good_reason_percent, 0 as ap_not_required_percent, 0 as restrictions_applied_percent, 0 as introduced_measures_percent, 0 as rest, 'Осень' as spring_autumn from t1 full outer join t2 on 1 = 1 full outer join t3 on 1 = 1 full outer join t4 on 1 = 1 full outer join t5 on 1 = 1 full outer join t6 on 1 = 1 full outer join t7 on 1 = 1 0 N N N 176 816 Y N