insert into result(name) values('P3_TER_VEN_MU_5');insert into result_val(value, result_id) select '620', r.id from result r where r.name='P3_TER_VEN_MU_5';insert into result_val(value, result_id) select '510', r.id from result r where r.name='P3_TER_VEN_MU_5';insert into result_val(value, result_id) select '340', r.id from result r where r.name='P3_TER_VEN_MU_5'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='620' and r.name='P3_TER_VEN_MU_5' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='510' and r.name='P3_TER_VEN_MU_5' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='340' and r.name='P3_TER_VEN_MU_5' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '1100', r.id from result r where r.name='P3_TER_VEN_MU_5';insert into result_val(value, result_id) select '880', r.id from result r where r.name='P3_TER_VEN_MU_5';insert into result_val(value, result_id) select '590', r.id from result r where r.name='P3_TER_VEN_MU_5'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_TER_VEN_MU_5' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='880' and r.name='P3_TER_VEN_MU_5' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='590' and r.name='P3_TER_VEN_MU_5' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_TER_VEN_MU_6');insert into result_val(value, result_id) select '490', r.id from result r where r.name='P3_TER_VEN_MU_6';insert into result_val(value, result_id) select '400', r.id from result r where r.name='P3_TER_VEN_MU_6';insert into result_val(value, result_id) select '270', r.id from result r where r.name='P3_TER_VEN_MU_6'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='490' and r.name='P3_TER_VEN_MU_6' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='400' and r.name='P3_TER_VEN_MU_6' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='270' and r.name='P3_TER_VEN_MU_6' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '920', r.id from result r where r.name='P3_TER_VEN_MU_6';insert into result_val(value, result_id) select '750', r.id from result r where r.name='P3_TER_VEN_MU_6';insert into result_val(value, result_id) select '500', r.id from result r where r.name='P3_TER_VEN_MU_6'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='920' and r.name='P3_TER_VEN_MU_6' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='750' and r.name='P3_TER_VEN_MU_6' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='500' and r.name='P3_TER_VEN_MU_6' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_TER_RC_MU_1');insert into result_val(value, result_id) select '570', r.id from result r where r.name='P3_TER_RC_MU_1';insert into result_val(value, result_id) select '610', r.id from result r where r.name='P3_TER_RC_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='570' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='610' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into result_val(value, result_id) select '370', r.id from result r where r.name='P3_TER_RC_MU_1';insert into result_val(value, result_id) select '430', r.id from result r where r.name='P3_TER_RC_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='370' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='430' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into result_val(value, result_id) select '410', r.id from result r where r.name='P3_TER_RC_MU_1';insert into result_val(value, result_id) select '470', r.id from result r where r.name='P3_TER_RC_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='410' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='470' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into result_val(value, result_id) select '680', r.id from result r where r.name='P3_TER_RC_MU_1';insert into result_val(value, result_id) select '900', r.id from result r where r.name='P3_TER_RC_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='680' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='900' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into result_val(value, result_id) select '470', r.id from result r where r.name='P3_TER_RC_MU_1';insert into result_val(value, result_id) select '620', r.id from result r where r.name='P3_TER_RC_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='470' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='620' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into result_val(value, result_id) select '370', r.id from result r where r.name='P3_TER_RC_MU_1';insert into result_val(value, result_id) select '430', r.id from result r where r.name='P3_TER_RC_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='370' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='430' and r.name='P3_TER_RC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into result(name) values('P3_TER_RC_MU_2');insert into result_val(value, result_id) select '440', r.id from result r where r.name='P3_TER_RC_MU_2';insert into result_val(value, result_id) select '470', r.id from result r where r.name='P3_TER_RC_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='440' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='470' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into result_val(value, result_id) select '290', r.id from result r where r.name='P3_TER_RC_MU_2';insert into result_val(value, result_id) select '330', r.id from result r where r.name='P3_TER_RC_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='290' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='330' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into result_val(value, result_id) select '320', r.id from result r where r.name='P3_TER_RC_MU_2';insert into result_val(value, result_id) select '360', r.id from result r where r.name='P3_TER_RC_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='320' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='360' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into result_val(value, result_id) select '520', r.id from result r where r.name='P3_TER_RC_MU_2';insert into result_val(value, result_id) select '690', r.id from result r where r.name='P3_TER_RC_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='520' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='690' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into result_val(value, result_id) select '360', r.id from result r where r.name='P3_TER_RC_MU_2';insert into result_val(value, result_id) select '480', r.id from result r where r.name='P3_TER_RC_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='360' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='480' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into result_val(value, result_id) select '290', r.id from result r where r.name='P3_TER_RC_MU_2';insert into result_val(value, result_id) select '330', r.id from result r where r.name='P3_TER_RC_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='290' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='330' and r.name='P3_TER_RC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into result(name) values('P3_ENER_MU');insert into result_val(value, result_id) select '37', r.id from result r where r.name='P3_ENER_MU';insert into result_val(value, result_id) select '66', r.id from result r where r.name='P3_ENER_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='37' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='66' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into result_val(value, result_id) select '24', r.id from result r where r.name='P3_ENER_MU';insert into result_val(value, result_id) select '43', r.id from result r where r.name='P3_ENER_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='24' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into result_val(value, result_id) select '27', r.id from result r where r.name='P3_ENER_MU';insert into result_val(value, result_id) select '47', r.id from result r where r.name='P3_ENER_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='27' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='47' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into result_val(value, result_id) select '29', r.id from result r where r.name='P3_ENER_MU';insert into result_val(value, result_id) select '78', r.id from result r where r.name='P3_ENER_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='29' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='78' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into result_val(value, result_id) select '31', r.id from result r where r.name='P3_ENER_MU';insert into result_val(value, result_id) select '54', r.id from result r where r.name='P3_ENER_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='31' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='54' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into result_val(value, result_id) select '24', r.id from result r where r.name='P3_ENER_MU';insert into result_val(value, result_id) select '43', r.id from result r where r.name='P3_ENER_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='24' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43' and r.name='P3_ENER_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ENER' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into result(name) values('P3_RECUP_MU');insert into result_val(value, result_id) select '150', r.id from result r where r.name='P3_RECUP_MU';insert into result_val(value, result_id) select '190', r.id from result r where r.name='P3_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150' and r.name='P3_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='ZONE' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='190' and r.name='P3_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='ZONE' and iv.value='1')     );insert into result_val(value, result_id) select '130', r.id from result r where r.name='P3_RECUP_MU';insert into result_val(value, result_id) select '160', r.id from result r where r.name='P3_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='130' and r.name='P3_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='ZONE' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='P3_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='ZONE' and iv.value='2')     );insert into result_val(value, result_id) select '80', r.id from result r where r.name='P3_RECUP_MU';insert into result_val(value, result_id) select '120', r.id from result r where r.name='P3_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='80' and r.name='P3_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='1')    or (i.name='ZONE' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='120' and r.name='P3_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='CUSAGE' and iv.value='2')    or (i.name='ZONE' and iv.value='3')     );insert into result(name) values('P3_COND_FRIG_EAU_MU');
insert into result_val(value, result_id) select '500', r.id from result r where r.name='P3_COND_FRIG_EAU_MU';insert into result_val(value, result_id) select '1900', r.id from result r where r.name='P3_COND_FRIG_EAU_MU';insert into result_val(value, result_id) select '1300', r.id from result r where r.name='P3_COND_FRIG_EAU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='500' and r.name='P3_COND_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTEAU' and iv.value='29')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='P3_COND_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTEAU' and iv.value='29')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_COND_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTEAU' and iv.value='29')     );insert into result_val(value, result_id) select '770', r.id from result r where r.name='P3_COND_FRIG_EAU_MU';insert into result_val(value, result_id) select '3000', r.id from result r where r.name='P3_COND_FRIG_EAU_MU';insert into result_val(value, result_id) select '2000', r.id from result r where r.name='P3_COND_FRIG_EAU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='770' and r.name='P3_COND_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTEAU' and iv.value='28')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3000' and r.name='P3_COND_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTEAU' and iv.value='28')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_COND_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTEAU' and iv.value='28')     );insert into result_val(value, result_id) select '1100', r.id from result r where r.name='P3_COND_FRIG_EAU_MU';insert into result_val(value, result_id) select '4100', r.id from result r where r.name='P3_COND_FRIG_EAU_MU';insert into result_val(value, result_id) select '2700', r.id from result r where r.name='P3_COND_FRIG_EAU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_COND_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTEAU' and iv.value='27')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4100' and r.name='P3_COND_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTEAU' and iv.value='27')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='P3_COND_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTEAU' and iv.value='27')     );insert into result(name) values('P3_COND_FRIG_ASEC_MU');insert into result_val(value, result_id) select '580', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '2300', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='580' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='13')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='13')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='13')     );insert into result_val(value, result_id) select '790', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '3100', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '2200', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='790' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='12')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='12')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='12')     );insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '3900', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '2800', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='11')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='11')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='11')     );insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '4800', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '3400', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='10')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4800' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='10')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='10')     );insert into result_val(value, result_id) select '1500', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '5800', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '4000', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='9')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5800' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='9')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='9')     );insert into result_val(value, result_id) select '1700', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '6800', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '4700', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='8')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6800' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='8')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='8')     );insert into result_val(value, result_id) select '2000', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '7800', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '5300', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='7')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7800' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='7')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5300' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='7')     );insert into result_val(value, result_id) select '2300', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '8900', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '6000', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8900' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6000' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='6')     );insert into result_val(value, result_id) select '2600', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '10100', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '6800', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10100' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6800' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='5')     );insert into result_val(value, result_id) select '2900', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '11300', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '7500', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11300' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7500' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='4')     );insert into result_val(value, result_id) select '3200', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '12600', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '8300', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12600' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8300' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='3')     );insert into result_val(value, result_id) select '3600', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '14000', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '9100', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14000' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9100' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='2')     );
insert into result_val(value, result_id) select '4000', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '15500', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU';insert into result_val(value, result_id) select '10000', r.id from result r where r.name='P3_COND_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTASEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15500' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTASEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10000' and r.name='P3_COND_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTASEC' and iv.value='1')     );insert into result(name) values('P3_COND_FRIG_AHUM_MU');insert into result_val(value, result_id) select '580', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '2300', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='580' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='26')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='26')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='26')     );insert into result_val(value, result_id) select '790', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '3100', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '2200', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='790' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='25')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='25')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='25')     );insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '3900', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '2800', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='24')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='24')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='24')     );insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '4800', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '3400', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='23')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4800' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='23')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='23')     );insert into result_val(value, result_id) select '1500', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '5800', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '4000', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='22')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5800' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='22')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='22')     );insert into result_val(value, result_id) select '1700', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '6800', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '4700', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='21')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6800' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='21')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='21')     );insert into result_val(value, result_id) select '2000', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '7800', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '5300', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='20')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7800' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='20')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5300' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='20')     );insert into result_val(value, result_id) select '2300', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '8900', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '6000', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='19')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8900' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='19')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6000' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='19')     );insert into result_val(value, result_id) select '2600', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '10100', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '6800', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='18')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10100' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='18')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6800' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='18')     );insert into result_val(value, result_id) select '2900', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '11300', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '7500', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='17')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11300' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='17')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7500' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='17')     );insert into result_val(value, result_id) select '3200', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '12600', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '8300', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='16')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12600' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='16')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8300' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='16')     );insert into result_val(value, result_id) select '3600', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '14000', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '9100', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='15')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14000' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='15')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9100' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='15')     );insert into result_val(value, result_id) select '4000', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '15500', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '10000', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='14')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15500' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='14')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10000' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='14')     );
insert into result_val(value, result_id) select '4000', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '15500', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU';insert into result_val(value, result_id) select '10000', r.id from result r where r.name='P3_COND_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='1')    or (i.name='DTAHUM' and iv.value='14')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15500' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='2')    or (i.name='DTAHUM' and iv.value='14')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10000' and r.name='P3_COND_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TYEP_CLIM' and iv.value='3')    or (i.name='DTAHUM' and iv.value='14')     );
insert into result(name) values('P3_IND_COLD_REG_MU');insert into result_val(value, result_id) select '14300', r.id from result r where r.name='P3_IND_COLD_REG_MU';insert into result_val(value, result_id) select '14300', r.id from result r where r.name='P3_IND_COLD_REG_MU';insert into result_val(value, result_id) select '13500', r.id from result r where r.name='P3_IND_COLD_REG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14300' and r.name='P3_IND_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SCOND' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14300' and r.name='P3_IND_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SCOND' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13500' and r.name='P3_IND_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SCOND' and iv.value='1')     );insert into result_val(value, result_id) select '11700', r.id from result r where r.name='P3_IND_COLD_REG_MU';insert into result_val(value, result_id) select '11700', r.id from result r where r.name='P3_IND_COLD_REG_MU';insert into result_val(value, result_id) select '10400', r.id from result r where r.name='P3_IND_COLD_REG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11700' and r.name='P3_IND_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SCOND' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11700' and r.name='P3_IND_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SCOND' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10400' and r.name='P3_IND_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SCOND' and iv.value='2')     );insert into result(name) values('P3_IND_DESTRAT_HLOC');insert into result_val(value, result_id) select '1', r.id from result r where r.name='P3_IND_DESTRAT_HLOC';insert into result_val(value, result_id) select '1.1', r.id from result r where r.name='P3_IND_DESTRAT_HLOC';insert into result_val(value, result_id) select '1.4', r.id from result r where r.name='P3_IND_DESTRAT_HLOC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='P3_IND_DESTRAT_HLOC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='HLOCCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='P3_IND_DESTRAT_HLOC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='HLOCCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1.4' and r.name='P3_IND_DESTRAT_HLOC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='HLOCCLASS' and iv.value='1')     );insert into result_val(value, result_id) select '2.7', r.id from result r where r.name='P3_IND_DESTRAT_HLOC';insert into result_val(value, result_id) select '3.1', r.id from result r where r.name='P3_IND_DESTRAT_HLOC';insert into result_val(value, result_id) select '3.7', r.id from result r where r.name='P3_IND_DESTRAT_HLOC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.7' and r.name='P3_IND_DESTRAT_HLOC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='HLOCCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3.1' and r.name='P3_IND_DESTRAT_HLOC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='HLOCCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3.7' and r.name='P3_IND_DESTRAT_HLOC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='HLOCCLASS' and iv.value='2')     );insert into result(name) values('AGR_COLD_REG_MU');insert into result_val(value, result_id) select '10600', r.id from result r where r.name='AGR_COLD_REG_MU';insert into result_val(value, result_id) select '10600', r.id from result r where r.name='AGR_COLD_REG_MU';insert into result_val(value, result_id) select '9700', r.id from result r where r.name='AGR_COLD_REG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10600' and r.name='AGR_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SCOND' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10600' and r.name='AGR_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SCOND' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9700' and r.name='AGR_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SCOND' and iv.value='1')     );insert into result_val(value, result_id) select '6200', r.id from result r where r.name='AGR_COLD_REG_MU';insert into result_val(value, result_id) select '6200', r.id from result r where r.name='AGR_COLD_REG_MU';insert into result_val(value, result_id) select '5400', r.id from result r where r.name='AGR_COLD_REG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6200' and r.name='AGR_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SCOND' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6200' and r.name='AGR_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SCOND' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5400' and r.name='AGR_COLD_REG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SCOND' and iv.value='2')     );
insert into result(name) values('TER_PACEE_MU');insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='TER_PACEE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='1')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '710', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '720', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '760', r.id from result r where r.name='TER_PACEE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='710' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='2')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '790', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '820', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '850', r.id from result r where r.name='TER_PACEE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='790' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='820' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='850' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='3')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '860', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '880', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '930', r.id from result r where r.name='TER_PACEE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='860' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='880' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='930' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='4')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '990', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TER_PACEE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='990' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='5')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '710', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '720', r.id from result r where r.name='TER_PACEE_MU';insert into result_val(value, result_id) select '760', r.id from result r where r.name='TER_PACEE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='710' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_PACEE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='6')     );insert into result(name) values('TER_PACEE_MUGT');insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '890', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '910', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '960', r.id from result r where r.name='TER_PACEE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='890' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='910' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='960' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='1')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '610', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '630', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '660', r.id from result r where r.name='TER_PACEE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='610' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='660' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='2')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '650', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '670', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '700', r.id from result r where r.name='TER_PACEE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='670' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='700' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='3')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '580', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '600', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '630', r.id from result r where r.name='TER_PACEE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='580' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='4')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '940', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '970', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TER_PACEE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='940' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='970' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='5')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '580', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '600', r.id from result r where r.name='TER_PACEE_MUGT';insert into result_val(value, result_id) select '630', r.id from result r where r.name='TER_PACEE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='580' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_PACEE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='6')     );
insert into result(name) values('TER_PACAE_MU');insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TER_PACAE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='1')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '670', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '680', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '720', r.id from result r where r.name='TER_PACAE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='670' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='680' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='2')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '750', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '770', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '800', r.id from result r where r.name='TER_PACAE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='750' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='770' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='800' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='3')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '820', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '840', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '880', r.id from result r where r.name='TER_PACAE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='820' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='840' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='880' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='4')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '940', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '960', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TER_PACAE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='940' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='960' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='5')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '670', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '680', r.id from result r where r.name='TER_PACAE_MU';insert into result_val(value, result_id) select '720', r.id from result r where r.name='TER_PACAE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='670' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='680' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_PACAE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='6')     );insert into result(name) values('TER_PACAE_MUGT');insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '840', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '870', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '910', r.id from result r where r.name='TER_PACAE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='840' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='870' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='910' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='1')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '580', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '600', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '630', r.id from result r where r.name='TER_PACAE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='580' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='2')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '620', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '640', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '670', r.id from result r where r.name='TER_PACAE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='620' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='640' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='670' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='3')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '550', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '570', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '600', r.id from result r where r.name='TER_PACAE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='550' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='570' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='4')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '890', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '920', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '960', r.id from result r where r.name='TER_PACAE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='890' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='920' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='960' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='5')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '550', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '570', r.id from result r where r.name='TER_PACAE_MUGT';insert into result_val(value, result_id) select '600', r.id from result r where r.name='TER_PACAE_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='550' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='570' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='3')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_PACAE_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='TERCOPCLASS' and iv.value='4')    or (i.name='SEC' and iv.value='6')     );insert into result(name) values('P3_IND_ISOPOINT_MU');insert into result_val(value, result_id) select '18400', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '3600', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '7100', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '19700', r.id from result r where r.name='P3_IND_ISOPOINT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18400' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='1')    or (i.name='MFUNC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='2')    or (i.name='MFUNC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7100' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='3')    or (i.name='MFUNC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19700' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='4')    or (i.name='MFUNC' and iv.value='1')     );insert into result_val(value, result_id) select '40400', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '8000', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '15600', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '43400', r.id from result r where r.name='P3_IND_ISOPOINT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='40400' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='1')    or (i.name='MFUNC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8000' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='2')    or (i.name='MFUNC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15600' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='3')    or (i.name='MFUNC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43400' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='4')    or (i.name='MFUNC' and iv.value='2')     );
insert into result_val(value, result_id) select '55100', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '10900', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '21300', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '59200', r.id from result r where r.name='P3_IND_ISOPOINT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='55100' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='1')    or (i.name='MFUNC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10900' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='2')    or (i.name='MFUNC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='21300' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='3')    or (i.name='MFUNC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='59200' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='4')    or (i.name='MFUNC' and iv.value='3')     );insert into result_val(value, result_id) select '77200', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '15200', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '29900', r.id from result r where r.name='P3_IND_ISOPOINT_MU';insert into result_val(value, result_id) select '82900', r.id from result r where r.name='P3_IND_ISOPOINT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='77200' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='1')    or (i.name='MFUNC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15200' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='2')    or (i.name='MFUNC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='29900' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='3')    or (i.name='MFUNC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='82900' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='NATFLUIDE' and iv.value='4')    or (i.name='MFUNC' and iv.value='4')     );insert into result(name) values('P3_IND_PRESSE_MU');insert into result_val(value, result_id) select '14200', r.id from result r where r.name='P3_IND_PRESSE_MU';insert into result_val(value, result_id) select '28300', r.id from result r where r.name='P3_IND_PRESSE_MU';insert into result_val(value, result_id) select '42500', r.id from result r where r.name='P3_IND_PRESSE_MU';insert into result_val(value, result_id) select '60200', r.id from result r where r.name='P3_IND_PRESSE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14200' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='1')    or (i.name='P3_PRESSE_TYPE' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='28300' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='2')    or (i.name='P3_PRESSE_TYPE' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='42500' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='3')    or (i.name='P3_PRESSE_TYPE' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='60200' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='4')    or (i.name='P3_PRESSE_TYPE' and iv.value='1')     );insert into result_val(value, result_id) select '9100', r.id from result r where r.name='P3_IND_PRESSE_MU';insert into result_val(value, result_id) select '18200', r.id from result r where r.name='P3_IND_PRESSE_MU';insert into result_val(value, result_id) select '27300', r.id from result r where r.name='P3_IND_PRESSE_MU';insert into result_val(value, result_id) select '38700', r.id from result r where r.name='P3_IND_PRESSE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9100' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='1')    or (i.name='P3_PRESSE_TYPE' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18200' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='2')    or (i.name='P3_PRESSE_TYPE' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='27300' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='3')    or (i.name='P3_PRESSE_TYPE' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='38700' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='4')    or (i.name='P3_PRESSE_TYPE' and iv.value='2')     );insert into result_val(value, result_id) select '4900', r.id from result r where r.name='P3_IND_PRESSE_MU';insert into result_val(value, result_id) select '9800', r.id from result r where r.name='P3_IND_PRESSE_MU';insert into result_val(value, result_id) select '14800', r.id from result r where r.name='P3_IND_PRESSE_MU';insert into result_val(value, result_id) select '20900', r.id from result r where r.name='P3_IND_PRESSE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4900' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='1')    or (i.name='P3_PRESSE_TYPE' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9800' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='2')    or (i.name='P3_PRESSE_TYPE' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14800' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='3')    or (i.name='P3_PRESSE_TYPE' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='20900' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='MFUNC' and iv.value='4')    or (i.name='P3_PRESSE_TYPE' and iv.value='3')     );insert into result(name) values('P3_IND_TRAI_EAU_MU');insert into result_val(value, result_id) select '70', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '230', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '460', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '650', r.id from result r where r.name='P3_IND_TRAI_EAU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='70' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='1')    or (i.name='MFUNC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='230' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='2')    or (i.name='MFUNC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='460' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='3')    or (i.name='MFUNC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='4')    or (i.name='MFUNC' and iv.value='1')     );insert into result_val(value, result_id) select '160', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '520', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_IND_TRAI_EAU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='1')    or (i.name='MFUNC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='520' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='2')    or (i.name='MFUNC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='3')    or (i.name='MFUNC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='4')    or (i.name='MFUNC' and iv.value='2')     );insert into result_val(value, result_id) select '220', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '700', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '1900', r.id from result r where r.name='P3_IND_TRAI_EAU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='220' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='1')    or (i.name='MFUNC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='700' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='2')    or (i.name='MFUNC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='3')    or (i.name='MFUNC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='4')    or (i.name='MFUNC' and iv.value='3')     );insert into result_val(value, result_id) select '300', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '990', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '2000', r.id from result r where r.name='P3_IND_TRAI_EAU_MU';insert into result_val(value, result_id) select '2700', r.id from result r where r.name='P3_IND_TRAI_EAU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='300' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='1')    or (i.name='MFUNC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='990' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='2')    or (i.name='MFUNC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='3')    or (i.name='MFUNC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='P3_IND_TRAI_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='IND_ZONE' and iv.value='4')    or (i.name='MFUNC' and iv.value='4')     );insert into result(name) values('P3_PCHBT_MU'); insert into result_val(value, result_id) select '300', r.id from result r where r.name='P3_PCHBT_MU';insert into result_val(value, result_id) select '210', r.id from result r where r.name='P3_PCHBT_MU';insert into result_val(value, result_id) select '280', r.id from result r where r.name='P3_PCHBT_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='300' and r.name='P3_PCHBT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='LOG' and iv.value='1')    or (i.name='ZONE' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='210' and r.name='P3_PCHBT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='LOG' and iv.value='2')    or (i.name='ZONE' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='280' and r.name='P3_PCHBT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='LOG' and iv.value='3')    or (i.name='ZONE' and iv.value='1')     ); insert into result_val(value, result_id) select '250', r.id from result r where r.name='P3_PCHBT_MU';insert into result_val(value, result_id) select '170', r.id from result r where r.name='P3_PCHBT_MU';insert into result_val(value, result_id) select '230', r.id from result r where r.name='P3_PCHBT_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='250' and r.name='P3_PCHBT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='LOG' and iv.value='1')    or (i.name='ZONE' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='170' and r.name='P3_PCHBT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='LOG' and iv.value='2')    or (i.name='ZONE' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='230' and r.name='P3_PCHBT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='LOG' and iv.value='3')    or (i.name='ZONE' and iv.value='2')     ); insert into result_val(value, result_id) select '160', r.id from result r where r.name='P3_PCHBT_MU';insert into result_val(value, result_id) select '110', r.id from result r where r.name='P3_PCHBT_MU';insert into result_val(value, result_id) select '150', r.id from result r where r.name='P3_PCHBT_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='P3_PCHBT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='LOG' and iv.value='1')    or (i.name='ZONE' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='110' and r.name='P3_PCHBT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='LOG' and iv.value='2')    or (i.name='ZONE' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150' and r.name='P3_PCHBT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='LOG' and iv.value='3')    or (i.name='ZONE' and iv.value='3')     ); insert into result(name) values('P3_GA_MU');
insert into result_val(value, result_id) select '3800', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '7900', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '8500', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '9000', r.id from result r where r.name='P3_GA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3800' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='1')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7900' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='2')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8500' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='3')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9000' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='4')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='1')     );insert into result_val(value, result_id) select '3200', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '7500', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '7800', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '8500', r.id from result r where r.name='P3_GA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='1')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7500' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='2')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7800' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='3')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8500' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='4')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='2')     );insert into result_val(value, result_id) select '3300', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '4000', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '4700', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '8300', r.id from result r where r.name='P3_GA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='1')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='2')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='3')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8300' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='4')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='3')     );insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '2600', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '4100', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '6500', r.id from result r where r.name='P3_GA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='1')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='2')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4100' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='3')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6500' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='4')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='4')     );insert into result_val(value, result_id) select '2900', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '5500', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '6300', r.id from result r where r.name='P3_GA_MU';insert into result_val(value, result_id) select '8000', r.id from result r where r.name='P3_GA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='1')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5500' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='2')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6300' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='3')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8000' and r.name='P3_GA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_TYPE_BATEAUX' and iv.value='4')    or (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='5')     );insert into result(name) values('P3_PAC_AGRI_ETAS'); insert into result_val(value, result_id) select '650', r.id from result r where r.name='P3_PAC_AGRI_ETAS';insert into result_val(value, result_id) select '350', r.id from result r where r.name='P3_PAC_AGRI_ETAS';   insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='P3_PAC_AGRI_ETAS' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_SERTYPE' and iv.value='1')    or (i.name='P3_ETASCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='350' and r.name='P3_PAC_AGRI_ETAS' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_SERTYPE' and iv.value='2')    or (i.name='P3_ETASCLASS' and iv.value='1')     );  insert into result_val(value, result_id) select '840', r.id from result r where r.name='P3_PAC_AGRI_ETAS';insert into result_val(value, result_id) select '450', r.id from result r where r.name='P3_PAC_AGRI_ETAS';   insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='840' and r.name='P3_PAC_AGRI_ETAS' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_SERTYPE' and iv.value='1')    or (i.name='P3_ETASCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='450' and r.name='P3_PAC_AGRI_ETAS' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_SERTYPE' and iv.value='2')    or (i.name='P3_ETASCLASS' and iv.value='2')     );  insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_PAC_AGRI_ETAS';insert into result_val(value, result_id) select '550', r.id from result r where r.name='P3_PAC_AGRI_ETAS';   insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_PAC_AGRI_ETAS' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_SERTYPE' and iv.value='1')    or (i.name='P3_ETASCLASS' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='550' and r.name='P3_PAC_AGRI_ETAS' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_SERTYPE' and iv.value='2')    or (i.name='P3_ETASCLASS' and iv.value='3')     );  insert into result(name) values('P3_PAC_AGRI_COP'); insert into result_val(value, result_id) select '880', r.id from result r where r.name='P3_PAC_AGRI_COP';insert into result_val(value, result_id) select '470', r.id from result r where r.name='P3_PAC_AGRI_COP';   insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='880' and r.name='P3_PAC_AGRI_COP' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_SERTYPE' and iv.value='1')    or (i.name='P3_COPECLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='470' and r.name='P3_PAC_AGRI_COP' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_SERTYPE' and iv.value='2')    or (i.name='P3_COPECLASS' and iv.value='1')     );  insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_PAC_AGRI_COP';insert into result_val(value, result_id) select '630', r.id from result r where r.name='P3_PAC_AGRI_COP';   insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_PAC_AGRI_COP' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_SERTYPE' and iv.value='1')    or (i.name='P3_COPECLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='630' and r.name='P3_PAC_AGRI_COP' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_SERTYPE' and iv.value='2')    or (i.name='P3_COPECLASS' and iv.value='2')     );  
insert into result(name) values('IND_MU_VEV');insert into result_val(value, result_id) select '17000', r.id from result r where r.name='IND_MU_VEV';insert into result_val(value, result_id) select '21000', r.id from result r where r.name='IND_MU_VEV';insert into result_val(value, result_id) select '8100', r.id from result r where r.name='IND_MU_VEV';insert into result_val(value, result_id) select '9800', r.id from result r where r.name='IND_MU_VEV';insert into result_val(value, result_id) select '7500', r.id from result r where r.name='IND_MU_VEV'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17000' and r.name='IND_MU_VEV' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='APPENGINE' and iv.value='1')    or (i.name='PENGINECLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='21000' and r.name='IND_MU_VEV' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='APPENGINE' and iv.value='2')    or (i.name='PENGINECLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8100' and r.name='IND_MU_VEV' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='APPENGINE' and iv.value='3')    or (i.name='PENGINECLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9800' and r.name='IND_MU_VEV' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='APPENGINE' and iv.value='4')    or (i.name='PENGINECLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7500' and r.name='IND_MU_VEV' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='APPENGINE' and iv.value='5')    or (i.name='PENGINECLASS' and iv.value='1')     );insert into result_val(value, result_id) select '28000', r.id from result r where r.name='IND_MU_VEV';insert into result_val(value, result_id) select '28000', r.id from result r where r.name='IND_MU_VEV';insert into result_val(value, result_id) select '13000', r.id from result r where r.name='IND_MU_VEV';insert into result_val(value, result_id) select '12000', r.id from result r where r.name='IND_MU_VEV';insert into result_val(value, result_id) select '13000', r.id from result r where r.name='IND_MU_VEV'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='28000' and r.name='IND_MU_VEV' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='APPENGINE' and iv.value='1')    or (i.name='PENGINECLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='28000' and r.name='IND_MU_VEV' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='APPENGINE' and iv.value='2')    or (i.name='PENGINECLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13000' and r.name='IND_MU_VEV' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='APPENGINE' and iv.value='3')    or (i.name='PENGINECLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12000' and r.name='IND_MU_VEV' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='APPENGINE' and iv.value='4')    or (i.name='PENGINECLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13000' and r.name='IND_MU_VEV' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='APPENGINE' and iv.value='5')    or (i.name='PENGINECLASS' and iv.value='2')     );insert into result(name) values('P3_C_MU_1');insert into result_val(value, result_id) select '0.8', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.91', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.81', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.95', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.87', r.id from result r where r.name='P3_C_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='1')    or (i.name='P3_TRA_M' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.91' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='2')    or (i.name='P3_TRA_M' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.81' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='3')    or (i.name='P3_TRA_M' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.95' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='4')    or (i.name='P3_TRA_M' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.87' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='5')    or (i.name='P3_TRA_M' and iv.value='1')     );insert into result_val(value, result_id) select '0.74', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.8', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.74', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.94', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.81', r.id from result r where r.name='P3_C_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.74' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='1')    or (i.name='P3_TRA_M' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='2')    or (i.name='P3_TRA_M' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.74' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='3')    or (i.name='P3_TRA_M' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.94' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='4')    or (i.name='P3_TRA_M' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.81' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='5')    or (i.name='P3_TRA_M' and iv.value='2')     );insert into result_val(value, result_id) select '0.65', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.69', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.68', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.83', r.id from result r where r.name='P3_C_MU_1';insert into result_val(value, result_id) select '0.71', r.id from result r where r.name='P3_C_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.65' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='1')    or (i.name='P3_TRA_M' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.69' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='2')    or (i.name='P3_TRA_M' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.68' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='3')    or (i.name='P3_TRA_M' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.83' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='4')    or (i.name='P3_TRA_M' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.71' and r.name='P3_C_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_BASSIN_NAVIGATION' and iv.value='5')    or (i.name='P3_TRA_M' and iv.value='3')     );
insert into result(name) values('PAC_AA_MU');insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAACLASS' and iv.value='1')  );insert into result_val(value, result_id) select '120000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '98000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '65000', r.id from result r where r.name='PAC_AA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='120000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='98000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='65000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAACLASS' and iv.value='2')  );insert into result_val(value, result_id) select '130000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '100000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '69000', r.id from result r where r.name='PAC_AA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='130000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAACLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='100000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAACLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='69000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAACLASS' and iv.value='3')  );insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAACLASS' and iv.value='1')  );insert into result_val(value, result_id) select '47000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '38000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '25000', r.id from result r where r.name='PAC_AA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='47000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='38000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='25000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAACLASS' and iv.value='2')  );insert into result_val(value, result_id) select '50000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '40000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '27000', r.id from result r where r.name='PAC_AA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='50000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAACLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='40000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAACLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='27000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAACLASS' and iv.value='3')  );insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAACLASS' and iv.value='1')  );insert into result_val(value, result_id) select '47000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '38000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '25000', r.id from result r where r.name='PAC_AA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='47000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='38000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='25000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAACLASS' and iv.value='2')  );insert into result_val(value, result_id) select '50000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '40000', r.id from result r where r.name='PAC_AA_MU';insert into result_val(value, result_id) select '27000', r.id from result r where r.name='PAC_AA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='50000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAACLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='40000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAACLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='27000' and r.name='PAC_AA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAACLASS' and iv.value='3')  );insert into result(name) values('PAC_EE_MU');insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='1')  );insert into result_val(value, result_id) select '160000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '130000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '84000', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='130000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='84000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='2')  );insert into result_val(value, result_id) select '160000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '130000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '87000', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='130000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='87000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='3')  );insert into result_val(value, result_id) select '170000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '140000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '91000', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='170000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='140000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='91000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='4')  );insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='1')  );insert into result_val(value, result_id) select '64000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '53000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '35000', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='64000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='53000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='35000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='2')  );insert into result_val(value, result_id) select '67000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '54000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '36000', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='67000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='54000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='36000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='3')  );insert into result_val(value, result_id) select '69000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '57000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '38000', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='69000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='57000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='38000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='4')  );
insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='1')  );insert into result_val(value, result_id) select '64000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '53000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '35000', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='64000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='53000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='35000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='2')  );insert into result_val(value, result_id) select '67000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '54000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '36000', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='67000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='54000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='36000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='3')  );insert into result_val(value, result_id) select '69000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '57000', r.id from result r where r.name='PAC_EE_MU';insert into result_val(value, result_id) select '38000', r.id from result r where r.name='PAC_EE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='69000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPEECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='57000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPEECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='38000' and r.name='PAC_EE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPEECLASS' and iv.value='4')  );insert into result(name) values('PAC_AE_MU');insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='1')  );insert into result_val(value, result_id) select '150000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '120000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '80000', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='120000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='80000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='2')  );insert into result_val(value, result_id) select '150000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '120000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '83000', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='120000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='83000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='3')  );insert into result_val(value, result_id) select '160000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '130000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '86000', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='130000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='86000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='4')  );insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='1')  );insert into result_val(value, result_id) select '61000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '50000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '33000', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='61000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='50000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='33000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='2')  );insert into result_val(value, result_id) select '63000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '52000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '35000', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='63000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='52000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='35000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='3')  );insert into result_val(value, result_id) select '66000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '54000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '36000', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='66000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='54000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='36000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='4')  );insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '0', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='1')  );insert into result_val(value, result_id) select '61000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '50000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '33000', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='61000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='50000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='33000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='2')  );insert into result_val(value, result_id) select '63000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '52000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '35000', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='63000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='52000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='35000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='3')  );insert into result_val(value, result_id) select '66000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '54000', r.id from result r where r.name='PAC_AE_MU';insert into result_val(value, result_id) select '36000', r.id from result r where r.name='PAC_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='66000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='COPAECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='54000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='COPAECLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='36000' and r.name='PAC_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='COPAECLASS' and iv.value='4')  );insert into result(name) values('RAD_MU');insert into result_val(value, result_id) select '2600', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '2100', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '1500', r.id from result r where r.name='RAD_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '2600', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '2100', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '1500', r.id from result r where r.name='RAD_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  );
 insert into result_val(value, result_id) select '1800', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '1500', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='RAD_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '2600', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '2200', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '1400', r.id from result r where r.name='RAD_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  );insert into result_val(value, result_id) select '1800', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '1500', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='RAD_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '2600', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '2200', r.id from result r where r.name='RAD_MU';insert into result_val(value, result_id) select '1400', r.id from result r where r.name='RAD_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='RAD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  );insert into result(name) values('ROB_MU');insert into result_val(value, result_id) select '1200', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '950', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '640', r.id from result r where r.name='ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='950' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='640' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '1200', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '950', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '640', r.id from result r where r.name='ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='950' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='640' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  ); insert into result_val(value, result_id) select '830', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '660', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '440', r.id from result r where r.name='ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='830' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='660' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='440' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '1200', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '950', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '640', r.id from result r where r.name='ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='950' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='640' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  );insert into result_val(value, result_id) select '830', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '660', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '440', r.id from result r where r.name='ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='830' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='660' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='440' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '1200', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '950', r.id from result r where r.name='ROB_MU';insert into result_val(value, result_id) select '640', r.id from result r where r.name='ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='950' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='640' and r.name='ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  );insert into result(name) values('VMC_DF_MU');insert into result_val(value, result_id) select '19850', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '16250', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '10800', r.id from result r where r.name='VMC_DF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19850' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='16250' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10800' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='1')  );insert into result_val(value, result_id) select '36150', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '29600', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '19750', r.id from result r where r.name='VMC_DF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='36150' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='29600' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19750' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='2')  );insert into result_val(value, result_id) select '13350', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '10900', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '7250', r.id from result r where r.name='VMC_DF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13350' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10900' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7250' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='1')  );insert into result_val(value, result_id) select '24050', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '19700', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '13150', r.id from result r where r.name='VMC_DF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='24050' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19700' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13150' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='2')  );insert into result_val(value, result_id) select '13350', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '10900', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '7250', r.id from result r where r.name='VMC_DF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13350' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10900' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7250' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='1')  );insert into result_val(value, result_id) select '24050', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '19700', r.id from result r where r.name='VMC_DF_MU';insert into result_val(value, result_id) select '13150', r.id from result r where r.name='VMC_DF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='24050' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19700' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13150' and r.name='VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='2')  );insert into result(name) values('VMC_SF_AG_MU');insert into result_val(value, result_id) select '17000', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '14000', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '9500', r.id from result r where r.name='VMC_SF_AG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='1')  );insert into result_val(value, result_id) select '30000', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '24500', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '16000', r.id from result r where r.name='VMC_SF_AG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='30000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='24500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='16000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='2')  );
insert into result_val(value, result_id) select '9500', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '7500', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '5000', r.id from result r where r.name='VMC_SF_AG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='1')  );insert into result_val(value, result_id) select '16500', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '13500', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '9000', r.id from result r where r.name='VMC_SF_AG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='16500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='2')  );insert into result_val(value, result_id) select '9500', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '7500', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '5000', r.id from result r where r.name='VMC_SF_AG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='1')  );insert into result_val(value, result_id) select '16500', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '13500', r.id from result r where r.name='VMC_SF_AG_MU';insert into result_val(value, result_id) select '9000', r.id from result r where r.name='VMC_SF_AG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='16500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='2')  );insert into result(name) values('VMC_SF_HG_MU');insert into result_val(value, result_id) select '19700', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '16100', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '10750', r.id from result r where r.name='VMC_SF_HG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19700' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='16100' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10750' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='1')  );insert into result_val(value, result_id) select '32850', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '26900', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '17900', r.id from result r where r.name='VMC_SF_HG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32850' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26900' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17900' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='2')  );insert into result_val(value, result_id) select '13300', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '10850', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '7250', r.id from result r where r.name='VMC_SF_HG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13300' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10850' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7250' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='1')  );insert into result_val(value, result_id) select '21550', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '17600', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '11750', r.id from result r where r.name='VMC_SF_HG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='21550' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17600' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11750' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='2')  );insert into result_val(value, result_id) select '13300', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '10850', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '7250', r.id from result r where r.name='VMC_SF_HG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13300' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10850' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7250' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='1')  );insert into result_val(value, result_id) select '21550', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '17600', r.id from result r where r.name='VMC_SF_HG_MU';insert into result_val(value, result_id) select '11750', r.id from result r where r.name='VMC_SF_HG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='21550' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17600' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='ENR' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11750' and r.name='VMC_SF_HG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='ENR' and iv.value='2')  );
insert into result(name) values('REC_EG_MU_I');insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '2300', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '2200', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '1900', r.id from result r where r.name='REC_EG_MU_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '5400', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '5000', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '4500', r.id from result r where r.name='REC_EG_MU_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5400' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4500' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='3')  );insert into result_val(value, result_id) select '10000', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '9300', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '8300', r.id from result r where r.name='REC_EG_MU_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10000' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9300' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8300' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='4')  );insert into result_val(value, result_id) select '13800', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '12900', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '11500', r.id from result r where r.name='REC_EG_MU_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13800' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12900' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11500' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='5')  );
insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '3500', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '3300', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '2900', r.id from result r where r.name='REC_EG_MU_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3500' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '8200', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '7600', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '6800', r.id from result r where r.name='REC_EG_MU_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8200' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7600' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6800' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='3')  );insert into result_val(value, result_id) select '15200', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '14200', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '12700', r.id from result r where r.name='REC_EG_MU_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15200' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14200' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12700' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='4')  );insert into result_val(value, result_id) select '21000', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '19600', r.id from result r where r.name='REC_EG_MU_I';insert into result_val(value, result_id) select '17500', r.id from result r where r.name='REC_EG_MU_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='21000' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19600' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17500' and r.name='REC_EG_MU_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='5')  );insert into result(name) values('REC_EG_MU_E');insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '3100', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '2900', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '2600', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '7200', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '6700', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '6000', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7200' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6700' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6000' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='3')  );insert into result_val(value, result_id) select '13300', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '12400', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '11100', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13300' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12400' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11100' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='4')  );insert into result_val(value, result_id) select '18400', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '17200', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '15400', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18400' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17200' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15400' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='5')  );insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '0', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '4700', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '4400', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '3900', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4400' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '10900', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '10200', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '9100', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10900' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10200' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9100' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='3')  );insert into result_val(value, result_id) select '20300', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '18900', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '16900', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='20300' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18900' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='16900' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='4')  );insert into result_val(value, result_id) select '28000', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '26200', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '23400', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='28000' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26200' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='23400' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='5')  );
insert into result_val(value, result_id) select '28000', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '26200', r.id from result r where r.name='REC_EG_MU_E';insert into result_val(value, result_id) select '23400', r.id from result r where r.name='REC_EG_MU_E'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='28000' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TeffCLASS' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26200' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TeffCLASS' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='23400' and r.name='REC_EG_MU_E' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='ENR' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TeffCLASS' and iv.value='5')  );insert into result(name) values('P3_ROB_MU');insert into result_val(value, result_id) select '1700', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '930', r.id from result r where r.name='P3_ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='930' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '1700', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '930', r.id from result r where r.name='P3_ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='930' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  ); insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '980', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '650', r.id from result r where r.name='P3_ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='980' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '1300', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '890', r.id from result r where r.name='P3_ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='890' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  );insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '980', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '650', r.id from result r where r.name='P3_ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='980' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '1300', r.id from result r where r.name='P3_ROB_MU';insert into result_val(value, result_id) select '890', r.id from result r where r.name='P3_ROB_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='890' and r.name='P3_ROB_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  );
insert into result(name) values('P3_PACE_MU');insert into result_val(value, result_id) select '68200', r.id from result r where r.name='P3_PACE_MU';insert into result_val(value, result_id) select '55800', r.id from result r where r.name='P3_PACE_MU';insert into result_val(value, result_id) select '37200', r.id from result r where r.name='P3_PACE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='68200' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_COPECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='55800' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_COPECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='37200' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_COPECLASS' and iv.value='1')  );insert into result_val(value, result_id) select '88900', r.id from result r where r.name='P3_PACE_MU';insert into result_val(value, result_id) select '72800', r.id from result r where r.name='P3_PACE_MU';insert into result_val(value, result_id) select '48500', r.id from result r where r.name='P3_PACE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='88900' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_COPECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='72800' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_COPECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='48500' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_COPECLASS' and iv.value='2')  ); insert into result_val(value, result_id) select '33800', r.id from result r where r.name='P3_PACE_MU';insert into result_val(value, result_id) select '27600', r.id from result r where r.name='P3_PACE_MU';insert into result_val(value, result_id) select '18400', r.id from result r where r.name='P3_PACE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='33800' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_COPECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='27600' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_COPECLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18400' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_COPECLASS' and iv.value='1')  );insert into result_val(value, result_id) select '45300', r.id from result r where r.name='P3_PACE_MU';insert into result_val(value, result_id) select '37100', r.id from result r where r.name='P3_PACE_MU';insert into result_val(value, result_id) select '24700', r.id from result r where r.name='P3_PACE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='45300' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_COPECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='37100' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_COPECLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='24700' and r.name='P3_PACE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_COPECLASS' and iv.value='2')  );insert into result(name) values('P3_PACE_MU_2');insert into result_val(value, result_id) select '87400', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '71500', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '47700', r.id from result r where r.name='P3_PACE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='87400' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='71500' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='47700' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '101100', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '82700', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '55200', r.id from result r where r.name='P3_PACE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='101100' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='82700' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='55200' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '114600', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '93800', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '62500', r.id from result r where r.name='P3_PACE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='114600' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='93800' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='62500' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into result_val(value, result_id) select '43200', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '35300', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '23600', r.id from result r where r.name='P3_PACE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43200' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='35300' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='23600' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '50900', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '41600', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '27700', r.id from result r where r.name='P3_PACE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='50900' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='41600' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='27700' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '58400', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '47800', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '31800', r.id from result r where r.name='P3_PACE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='58400' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='47800' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='31800' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into result_val(value, result_id) select '43200', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '35300', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '23600', r.id from result r where r.name='P3_PACE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43200' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='35300' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='23600' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '50900', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '41600', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '27700', r.id from result r where r.name='P3_PACE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='50900' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='41600' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='27700' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '58400', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '47800', r.id from result r where r.name='P3_PACE_MU_2';insert into result_val(value, result_id) select '31800', r.id from result r where r.name='P3_PACE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='58400' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='47800' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='31800' and r.name='P3_PACE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into result(name) values('P3_PACE_MU_3');insert into result_val(value, result_id) select '52700', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '43100', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '28700', r.id from result r where r.name='P3_PACE_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='52700' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43100' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='28700' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '66400', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '54400', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '36200', r.id from result r where r.name='P3_PACE_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='66400' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='54400' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='36200' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '79900', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '65400', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '43600', r.id from result r where r.name='P3_PACE_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='79900' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='65400' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43600' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='3')  );
