insert into r_result(name) values('ISOC_MU');insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='ISOC_MU';insert into r_result_val(value, result_id) select '980', r.id from r_result r where r.name='ISOC_MU';insert into r_result_val(value, result_id) select '660', r.id from r_result r where r.name='ISOC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='980' and r.name='ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='660' and r.name='ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '1900', r.id from r_result r where r.name='ISOC_MU';insert into r_result_val(value, result_id) select '1600', r.id from r_result r where r.name='ISOC_MU';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='ISOC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('ISOM_MU');insert into r_result_val(value, result_id) select '1900', r.id from r_result r where r.name='ISOM_MU';insert into r_result_val(value, result_id) select '1600', r.id from r_result r where r.name='ISOM_MU';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='ISOM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '3100', r.id from r_result r where r.name='ISOM_MU';insert into r_result_val(value, result_id) select '2500', r.id from r_result r where r.name='ISOM_MU';insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='ISOM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('ISOP_MU');insert into r_result_val(value, result_id) select '2400', r.id from r_result r where r.name='ISOP_MU';insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='ISOP_MU';insert into r_result_val(value, result_id) select '1300', r.id from r_result r where r.name='ISOP_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '3800', r.id from r_result r where r.name='ISOP_MU';insert into r_result_val(value, result_id) select '3100', r.id from r_result r where r.name='ISOP_MU';insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='ISOP_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3800' and r.name='ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('FEN_MU');insert into r_result_val(value, result_id) select '3900', r.id from r_result r where r.name='FEN_MU';insert into r_result_val(value, result_id) select '3200', r.id from r_result r where r.name='FEN_MU';insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='FEN_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '6100', r.id from r_result r where r.name='FEN_MU';insert into r_result_val(value, result_id) select '5000', r.id from r_result r where r.name='FEN_MU';insert into r_result_val(value, result_id) select '3400', r.id from r_result r where r.name='FEN_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6100' and r.name='FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('ISOT_MediumRT_MU');insert into r_result_val(value, result_id) select '550', r.id from r_result r where r.name='ISOT_MediumRT_MU';insert into r_result_val(value, result_id) select '450', r.id from r_result r where r.name='ISOT_MediumRT_MU';insert into r_result_val(value, result_id) select '300', r.id from r_result r where r.name='ISOT_MediumRT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='550' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='450' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='300' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '880', r.id from r_result r where r.name='ISOT_MediumRT_MU';insert into r_result_val(value, result_id) select '720', r.id from r_result r where r.name='ISOT_MediumRT_MU';insert into r_result_val(value, result_id) select '480', r.id from r_result r where r.name='ISOT_MediumRT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='880' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='720' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='480' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('ISOT_BigRT_MU');insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='ISOT_BigRT_MU';insert into r_result_val(value, result_id) select '950', r.id from r_result r where r.name='ISOT_BigRT_MU';insert into r_result_val(value, result_id) select '630', r.id from r_result r where r.name='ISOT_BigRT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='950' and r.name='ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='630' and r.name='ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '1800', r.id from r_result r where r.name='ISOT_BigRT_MU';insert into r_result_val(value, result_id) select '1500', r.id from r_result r where r.name='ISOT_BigRT_MU';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='ISOT_BigRT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('CH_COGE_MU_M');insert into r_result_val(value, result_id) select '91000', r.id from r_result r where r.name='CH_COGE_MU_M';insert into r_result_val(value, result_id) select '74000', r.id from r_result r where r.name='CH_COGE_MU_M';insert into r_result_val(value, result_id) select '50000', r.id from r_result r where r.name='CH_COGE_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='91000' and r.name='CH_COGE_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='74000' and r.name='CH_COGE_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='50000' and r.name='CH_COGE_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='1')     );insert into r_result_val(value, result_id) select '110000', r.id from r_result r where r.name='CH_COGE_MU_M';insert into r_result_val(value, result_id) select '91000', r.id from r_result r where r.name='CH_COGE_MU_M';insert into r_result_val(value, result_id) select '61000', r.id from r_result r where r.name='CH_COGE_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='110000' and r.name='CH_COGE_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='91000' and r.name='CH_COGE_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='61000' and r.name='CH_COGE_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='2')     );insert into r_result_val(value, result_id) select '110000', r.id from r_result r where r.name='CH_COGE_MU_M';insert into r_result_val(value, result_id) select '87000', r.id from r_result r where r.name='CH_COGE_MU_M';insert into r_result_val(value, result_id) select '59000', r.id from r_result r where r.name='CH_COGE_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='110000' and r.name='CH_COGE_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='87000' and r.name='CH_COGE_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='59000' and r.name='CH_COGE_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='3')     );insert into r_result(name) values('CH_COGE_MU_A');insert into r_result_val(value, result_id) select '48000', r.id from r_result r where r.name='CH_COGE_MU_A';insert into r_result_val(value, result_id) select '39000', r.id from r_result r where r.name='CH_COGE_MU_A';insert into r_result_val(value, result_id) select '26000', r.id from r_result r where r.name='CH_COGE_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='48000' and r.name='CH_COGE_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='39000' and r.name='CH_COGE_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='26000' and r.name='CH_COGE_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='1')     );insert into r_result_val(value, result_id) select '65000', r.id from r_result r where r.name='CH_COGE_MU_A';insert into r_result_val(value, result_id) select '53000', r.id from r_result r where r.name='CH_COGE_MU_A';insert into r_result_val(value, result_id) select '36000', r.id from r_result r where r.name='CH_COGE_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='65000' and r.name='CH_COGE_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='53000' and r.name='CH_COGE_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='36000' and r.name='CH_COGE_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='2')     );insert into r_result_val(value, result_id) select '62000', r.id from r_result r where r.name='ZONE';insert into r_result_val(value, result_id) select '51000', r.id from r_result r where r.name='ZONE';insert into r_result_val(value, result_id) select '34000', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='62000' and r.name='CH_COGE_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='51000' and r.name='CH_COGE_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='34000' and r.name='CH_COGE_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='3')     );
insert into r_result(name) values('TER_ISOM_MU');insert into r_result_val(value, result_id) select '3900', r.id from r_result r where r.name='TER_ISOM_MU';insert into r_result_val(value, result_id) select '3200', r.id from r_result r where r.name='TER_ISOM_MU';insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='TER_ISOM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '6100', r.id from r_result r where r.name='TER_ISOM_MU';insert into r_result_val(value, result_id) select '5000', r.id from r_result r where r.name='TER_ISOM_MU';insert into r_result_val(value, result_id) select '3300', r.id from r_result r where r.name='TER_ISOM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6100' and r.name='TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('TER_ISOC_MU');insert into r_result_val(value, result_id) select '2400', r.id from r_result r where r.name='TER_ISOC_MU';insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='TER_ISOC_MU';insert into r_result_val(value, result_id) select '1300', r.id from r_result r where r.name='TER_ISOC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '3800', r.id from r_result r where r.name='TER_ISOC_MU';insert into r_result_val(value, result_id) select '3100', r.id from r_result r where r.name='TER_ISOC_MU';insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='TER_ISOC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3800' and r.name='TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('TER_ISOP_MU');insert into r_result_val(value, result_id) select '4800', r.id from r_result r where r.name='TER_ISOP_MU';insert into r_result_val(value, result_id) select '3900', r.id from r_result r where r.name='TER_ISOP_MU';insert into r_result_val(value, result_id) select '2700', r.id from r_result r where r.name='TER_ISOP_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4800' and r.name='TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '7600', r.id from r_result r where r.name='TER_ISOP_MU';insert into r_result_val(value, result_id) select '6200', r.id from r_result r where r.name='TER_ISOP_MU';insert into r_result_val(value, result_id) select '4300', r.id from r_result r where r.name='TER_ISOP_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7600' and r.name='TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6200' and r.name='TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4300' and r.name='TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('TER_ISOF_MU');insert into r_result_val(value, result_id) select '4000', r.id from r_result r where r.name='TER_ISOF_MU';insert into r_result_val(value, result_id) select '3300', r.id from r_result r where r.name='TER_ISOF_MU';insert into r_result_val(value, result_id) select '2200', r.id from r_result r where r.name='TER_ISOF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '6300', r.id from r_result r where r.name='TER_ISOF_MU';insert into r_result_val(value, result_id) select '5100', r.id from r_result r where r.name='TER_ISOF_MU';insert into r_result_val(value, result_id) select '3400', r.id from r_result r where r.name='TER_ISOF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6300' and r.name='TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5100' and r.name='TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('TER_ISOT_MediumRT_MU');insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='TER_ISOT_MediumRT_MU';insert into r_result_val(value, result_id) select '910', r.id from r_result r where r.name='TER_ISOT_MediumRT_MU';insert into r_result_val(value, result_id) select '600', r.id from r_result r where r.name='TER_ISOT_MediumRT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='910' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '1800', r.id from r_result r where r.name='TER_ISOT_MediumRT_MU';insert into r_result_val(value, result_id) select '1400', r.id from r_result r where r.name='TER_ISOT_MediumRT_MU';insert into r_result_val(value, result_id) select '960', r.id from r_result r where r.name='TER_ISOT_MediumRT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='960' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('TER_ISOT_BigRT_MU');insert into r_result_val(value, result_id) select '2300', r.id from r_result r where r.name='TER_ISOT_BigRT_MU';insert into r_result_val(value, result_id) select '1900', r.id from r_result r where r.name='TER_ISOT_BigRT_MU';insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='TER_ISOT_BigRT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '3600', r.id from r_result r where r.name='TER_ISOT_BigRT_MU';insert into r_result_val(value, result_id) select '3000', r.id from r_result r where r.name='TER_ISOT_BigRT_MU';insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='TER_ISOT_BigRT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3000' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('TER_CH_BAS_MU1');insert into r_result_val(value, result_id) select '340', r.id from r_result r where r.name='TER_CH_BAS_MU1';insert into r_result_val(value, result_id) select '280', r.id from r_result r where r.name='TER_CH_BAS_MU1';insert into r_result_val(value, result_id) select '180', r.id from r_result r where r.name='TER_CH_BAS_MU1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='340' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='280' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='180' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_result_val(value, result_id) select '410', r.id from r_result r where r.name='TER_CH_BAS_MU1';insert into r_result_val(value, result_id) select '330', r.id from r_result r where r.name='TER_CH_BAS_MU1';insert into r_result_val(value, result_id) select '220', r.id from r_result r where r.name='TER_CH_BAS_MU1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='410' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='330' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='220' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='2')     );
insert into r_result(name) values('TER_CH_BAS_MU2');insert into r_result_val(value, result_id) select '370', r.id from r_result r where r.name='TER_CH_BAS_MU2';insert into r_result_val(value, result_id) select '310', r.id from r_result r where r.name='TER_CH_BAS_MU2';insert into r_result_val(value, result_id) select '220', r.id from r_result r where r.name='TER_CH_BAS_MU2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='370' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='310' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='220' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_result_val(value, result_id) select '450', r.id from r_result r where r.name='TER_CH_BAS_MU2';insert into r_result_val(value, result_id) select '380', r.id from r_result r where r.name='TER_CH_BAS_MU2';insert into r_result_val(value, result_id) select '270', r.id from r_result r where r.name='TER_CH_BAS_MU2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='450' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='380' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='270' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_result(name) values('TER_CH_COND_MU1');insert into r_result_val(value, result_id) select '770', r.id from r_result r where r.name='TER_CH_COND_MU1';insert into r_result_val(value, result_id) select '630', r.id from r_result r where r.name='TER_CH_COND_MU1';insert into r_result_val(value, result_id) select '420', r.id from r_result r where r.name='TER_CH_COND_MU1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='770' and r.name='TER_CH_COND_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_CH_COND_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='420' and r.name='TER_CH_COND_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_result_val(value, result_id) select '930', r.id from r_result r where r.name='TER_CH_COND_MU1';insert into r_result_val(value, result_id) select '760', r.id from r_result r where r.name='TER_CH_COND_MU1';insert into r_result_val(value, result_id) select '510', r.id from r_result r where r.name='TER_CH_COND_MU1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='930' and r.name='TER_CH_COND_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_CH_COND_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='510' and r.name='TER_CH_COND_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_result(name) values('TER_CH_COND_MU2');insert into r_result_val(value, result_id) select '860', r.id from r_result r where r.name='TER_CH_COND_MU2';insert into r_result_val(value, result_id) select '720', r.id from r_result r where r.name='TER_CH_COND_MU2';insert into r_result_val(value, result_id) select '500', r.id from r_result r where r.name='TER_CH_COND_MU2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='860' and r.name='TER_CH_COND_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_CH_COND_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='500' and r.name='TER_CH_COND_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='1')     );insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='TER_CH_COND_MU2';insert into r_result_val(value, result_id) select '860', r.id from r_result r where r.name='TER_CH_COND_MU2';insert into r_result_val(value, result_id) select '610', r.id from r_result r where r.name='TER_CH_COND_MU2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_CH_COND_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='860' and r.name='TER_CH_COND_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='610' and r.name='TER_CH_COND_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='2')     );insert into r_result(name) values('TER_PROGEL_MU');insert into r_result_val(value, result_id) select '200', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '170', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '110', r.id from r_result r where r.name='TER_PROGEL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='200' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='200' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='170' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into r_result_val(value, result_id) select '140', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '110', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '80', r.id from r_result r where r.name='TER_PROGEL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='110' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into r_result_val(value, result_id) select '150', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '120', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '80', r.id from r_result r where r.name='TER_PROGEL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='150' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='150' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='120' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into r_result_val(value, result_id) select '160', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '130', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '90', r.id from r_result r where r.name='TER_PROGEL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='160' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='160' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='130' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into r_result_val(value, result_id) select '190', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '150', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '100', r.id from r_result r where r.name='TER_PROGEL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='190' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='190' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='150' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into r_result_val(value, result_id) select '140', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '110', r.id from r_result r where r.name='TER_PROGEL_MU';insert into r_result_val(value, result_id) select '80', r.id from r_result r where r.name='TER_PROGEL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='110' and r.name='TER_PROGEL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );
insert into r_result(name) values('TER_PROGEL_MUGT');insert into r_result_val(value, result_id) select '170', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '140', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '90', r.id from r_result r where r.name='TER_PROGEL_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='170' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='90' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='1')     );insert into r_result_val(value, result_id) select '120', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '100', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '60', r.id from r_result r where r.name='TER_PROGEL_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='120' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='100' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='60' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='2')     );insert into r_result_val(value, result_id) select '120', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '100', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '70', r.id from r_result r where r.name='TER_PROGEL_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='120' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='100' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='70' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='3')     );insert into r_result_val(value, result_id) select '110', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '90', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '60', r.id from r_result r where r.name='TER_PROGEL_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='110' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='90' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='60' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='4')     );insert into r_result_val(value, result_id) select '180', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '150', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '100', r.id from r_result r where r.name='TER_PROGEL_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='180' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='150' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='100' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='5')     );insert into r_result_val(value, result_id) select '6', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '90', r.id from r_result r where r.name='TER_PROGEL_MUGT';insert into r_result_val(value, result_id) select '60', r.id from r_result r where r.name='TER_PROGEL_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='90' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='60' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='6')     );insert into r_result(name) values('TER_RACC_MU');insert into r_result_val(value, result_id) select '2200', r.id from r_result r where r.name='TER_RACC_MU';insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='TER_RACC_MU';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='TER_RACC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='TER_RACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='TER_RACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_RACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE' and iv.value='1')     );insert into r_result_val(value, result_id) select '2400', r.id from r_result r where r.name='TER_RACC_MU';insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='TER_RACC_MU';insert into r_result_val(value, result_id) select '1300', r.id from r_result r where r.name='TER_RACC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='TER_RACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='TER_RACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='TER_RACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE' and iv.value='2')     );insert into r_result(name) values('TER_VMC_DF_MU');insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='TER_VMC_DF_MU';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='TER_VMC_DF_MU';insert into r_result_val(value, result_id) select '670', r.id from r_result r where r.name='TER_VMC_DF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='670' and r.name='TER_VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='TER_VMC_DF_MU';insert into r_result_val(value, result_id) select '1600', r.id from r_result r where r.name='TER_VMC_DF_MU';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='TER_VMC_DF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='TER_VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='TER_VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('TER_VMC_DF_MUGT');insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='TER_VMC_DF_MUGT';insert into r_result_val(value, result_id) select '900', r.id from r_result r where r.name='TER_VMC_DF_MUGT';insert into r_result_val(value, result_id) select '600', r.id from r_result r where r.name='TER_VMC_DF_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='900' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '1900', r.id from r_result r where r.name='TER_VMC_DF_MUGT';insert into r_result_val(value, result_id) select '1600', r.id from r_result r where r.name='TER_VMC_DF_MUGT';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='TER_VMC_DF_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('TER_VMC_SFA_MU');insert into r_result_val(value, result_id) select '290', r.id from r_result r where r.name='TER_VMC_SFA_MU';insert into r_result_val(value, result_id) select '230', r.id from r_result r where r.name='TER_VMC_SFA_MU';insert into r_result_val(value, result_id) select '160', r.id from r_result r where r.name='TER_VMC_SFA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='290' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='230' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='160' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '510', r.id from r_result r where r.name='TER_VMC_SFA_MU';insert into r_result_val(value, result_id) select '420', r.id from r_result r where r.name='TER_VMC_SFA_MU';insert into r_result_val(value, result_id) select '280', r.id from r_result r where r.name='TER_VMC_SFA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='510' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='420' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='280' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('TER_VMC_SFA_MUGT');insert into r_result_val(value, result_id) select '240', r.id from r_result r where r.name='TER_VMC_SFA_MUGT';insert into r_result_val(value, result_id) select '190', r.id from r_result r where r.name='TER_VMC_SFA_MUGT';insert into r_result_val(value, result_id) select '130', r.id from r_result r where r.name='TER_VMC_SFA_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='240' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='190' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='130' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '350', r.id from r_result r where r.name='TER_VMC_SFA_MUGT';insert into r_result_val(value, result_id) select '290', r.id from r_result r where r.name='TER_VMC_SFA_MUGT';insert into r_result_val(value, result_id) select '190', r.id from r_result r where r.name='TER_VMC_SFA_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='350' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='290' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='190' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );
insert into r_result(name) values('TER_LED_DOWN_MU');insert into r_result_val(value, result_id) select '640', r.id from r_result r where r.name='TER_LED_DOWN_MU';insert into r_result_val(value, result_id) select '770', r.id from r_result r where r.name='TER_LED_DOWN_MU';insert into r_result_val(value, result_id) select '890', r.id from r_result r where r.name='TER_LED_DOWN_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='640' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='1')    or (i.name='LEDLIFE' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='770' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='2')    or (i.name='LEDLIFE' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='890' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='3')    or (i.name='LEDLIFE' and iv.value='1')     );insert into r_result_val(value, result_id) select '1180', r.id from r_result r where r.name='TER_LED_DOWN_MU';insert into r_result_val(value, result_id) select '1420', r.id from r_result r where r.name='TER_LED_DOWN_MU';insert into r_result_val(value, result_id) select '1660', r.id from r_result r where r.name='TER_LED_DOWN_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1180' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='1')    or (i.name='LEDLIFE' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1420' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='2')    or (i.name='LEDLIFE' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1660' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='3')    or (i.name='LEDLIFE' and iv.value='2')     );insert into r_result(name) values('TER_LED_ACC_MU');insert into r_result_val(value, result_id) select '630', r.id from r_result r where r.name='TER_LED_ACC_MU';insert into r_result_val(value, result_id) select '760', r.id from r_result r where r.name='TER_LED_ACC_MU';insert into r_result_val(value, result_id) select '880', r.id from r_result r where r.name='TER_LED_ACC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_LED_ACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='1')    or (i.name='LEDLIFE' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_LED_ACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='2')    or (i.name='LEDLIFE' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='880' and r.name='TER_LED_ACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='3')    or (i.name='LEDLIFE' and iv.value='1')     );insert into r_result_val(value, result_id) select '1300', r.id from r_result r where r.name='TER_LED_ACC_MU';insert into r_result_val(value, result_id) select '1560', r.id from r_result r where r.name='TER_LED_ACC_MU';insert into r_result_val(value, result_id) select '1820', r.id from r_result r where r.name='TER_LED_ACC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='TER_LED_ACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='1')    or (i.name='LEDLIFE' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1560' and r.name='TER_LED_ACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='2')    or (i.name='LEDLIFE' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1820' and r.name='TER_LED_ACC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LEDGEST' and iv.value='3')    or (i.name='LEDLIFE' and iv.value='2')     );insert into r_result(name) values('TER_VENTILO_CH_FC');insert into r_result_val(value, result_id) select '2.3', r.id from r_result r where r.name='TER_VENTILO_CH_FC';insert into r_result_val(value, result_id) select '2.35', r.id from r_result r where r.name='TER_VENTILO_CH_FC';insert into r_result_val(value, result_id) select '2.35', r.id from r_result r where r.name='TER_VENTILO_CH_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.3' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.35' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.35' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='1')     );insert into r_result_val(value, result_id) select '2.2', r.id from r_result r where r.name='TER_VENTILO_CH_FC';insert into r_result_val(value, result_id) select '2.2', r.id from r_result r where r.name='TER_VENTILO_CH_FC';insert into r_result_val(value, result_id) select '2.2', r.id from r_result r where r.name='TER_VENTILO_CH_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.2' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.2' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.2' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='2')     );insert into r_result_val(value, result_id) select '0.65', r.id from r_result r where r.name='TER_VENTILO_CH_FC';insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_VENTILO_CH_FC';insert into r_result_val(value, result_id) select '0.65', r.id from r_result r where r.name='TER_VENTILO_CH_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.65' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.65' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='3')     );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_VENTILO_CH_FC';insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_VENTILO_CH_FC';insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_VENTILO_CH_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='4')     );insert into r_result_val(value, result_id) select '0.45', r.id from r_result r where r.name='TER_VENTILO_CH_FC';insert into r_result_val(value, result_id) select '0.45', r.id from r_result r where r.name='TER_VENTILO_CH_FC';insert into r_result_val(value, result_id) select '0.4', r.id from r_result r where r.name='TER_VENTILO_CH_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.45' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.45' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.4' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='5')     );insert into r_result(name) values('TER_VENTILO_FR_FC');insert into r_result_val(value, result_id) select '2.05', r.id from r_result r where r.name='TER_VENTILO_FR_FC';insert into r_result_val(value, result_id) select '2.1', r.id from r_result r where r.name='TER_VENTILO_FR_FC';insert into r_result_val(value, result_id) select '2.05', r.id from r_result r where r.name='TER_VENTILO_FR_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.05' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.1' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.05' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='1')     );insert into r_result_val(value, result_id) select '3.1', r.id from r_result r where r.name='TER_VENTILO_FR_FC';insert into r_result_val(value, result_id) select '3.35', r.id from r_result r where r.name='TER_VENTILO_FR_FC';insert into r_result_val(value, result_id) select '2.6', r.id from r_result r where r.name='TER_VENTILO_FR_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.1' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.35' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.6' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='2')     );insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_VENTILO_FR_FC';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_VENTILO_FR_FC';insert into r_result_val(value, result_id) select '0.8', r.id from r_result r where r.name='TER_VENTILO_FR_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='3')     );insert into r_result_val(value, result_id) select '1.85', r.id from r_result r where r.name='TER_VENTILO_FR_FC';insert into r_result_val(value, result_id) select '1.55', r.id from r_result r where r.name='TER_VENTILO_FR_FC';insert into r_result_val(value, result_id) select '0.95', r.id from r_result r where r.name='TER_VENTILO_FR_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.85' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.55' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.95' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='4')     );insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_VENTILO_FR_FC';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_VENTILO_FR_FC';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_VENTILO_FR_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='5')     );
insert into r_result(name) values('TER_LUMT5_FC');insert into r_result_val(value, result_id) select '750', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '900', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '1050', r.id from r_result r where r.name='TER_LUMT5_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='750' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='900' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1050' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='1')     );insert into r_result_val(value, result_id) select '540', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '650', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '760', r.id from r_result r where r.name='TER_LUMT5_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='540' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='650' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='2')     );insert into r_result_val(value, result_id) select '830', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='TER_LUMT5_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='830' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='3')     );insert into r_result_val(value, result_id) select '540', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '650', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '760', r.id from r_result r where r.name='TER_LUMT5_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='540' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='650' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='4')     );insert into r_result_val(value, result_id) select '1600', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '1950', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '2300', r.id from r_result r where r.name='TER_LUMT5_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1950' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='5')     );insert into r_result_val(value, result_id) select '540', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '650', r.id from r_result r where r.name='TER_LUMT5_FC';insert into r_result_val(value, result_id) select '760', r.id from r_result r where r.name='TER_LUMT5_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='540' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='650' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_LUMT5_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='6')     );insert into r_result(name) values('TER_LUMFLUO_BALLAST_FC');insert into r_result_val(value, result_id) select '700', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '840', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='700' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='840' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='1')     );insert into r_result_val(value, result_id) select '500', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '610', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '710', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='500' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='610' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='710' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='2')     );insert into r_result_val(value, result_id) select '900', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '1300', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='900' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='3')     );insert into r_result_val(value, result_id) select '840', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='840' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='4')     );insert into r_result_val(value, result_id) select '1500', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '1800', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='5')     );insert into r_result_val(value, result_id) select '500', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '610', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into r_result_val(value, result_id) select '710', r.id from r_result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='500' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='610' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='710' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='LUMGEST' and iv.value='3')    or (i.name='SEC' and iv.value='6')     );insert into r_result(name) values('TER_VMMP_MU');insert into r_result_val(value, result_id) select '2300', r.id from r_result r where r.name='TER_VMMP_MU';insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='TER_VMMP_MU';insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='TER_VMMP_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='TER_VMMP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='TER_VMMP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_VMMP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '3100', r.id from r_result r where r.name='TER_VMMP_MU';insert into r_result_val(value, result_id) select '2500', r.id from r_result r where r.name='TER_VMMP_MU';insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='TER_VMMP_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='TER_VMMP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='TER_VMMP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='TER_VMMP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('TER_VMMP_MUGT');insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='TER_VMMP_MUGT';insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='TER_VMMP_MUGT';insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='TER_VMMP_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='TER_VMMP_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='TER_VMMP_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_VMMP_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '2800', r.id from r_result r where r.name='TER_VMMP_MUGT';insert into r_result_val(value, result_id) select '2300', r.id from r_result r where r.name='TER_VMMP_MUGT';insert into r_result_val(value, result_id) select '1500', r.id from r_result r where r.name='TER_VMMP_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='TER_VMMP_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='TER_VMMP_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='TER_VMMP_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );
insert into r_result(name) values('IND_FC_STRAT');insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='IND_FC_STRAT';insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='IND_FC_STRAT';insert into r_result_val(value, result_id) select '1.4', r.id from r_result r where r.name='IND_FC_STRAT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_FC_STRAT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='IND_FC_STRAT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.4' and r.name='IND_FC_STRAT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '2.7', r.id from r_result r where r.name='IND_FC_STRAT';insert into r_result_val(value, result_id) select '3.1', r.id from r_result r where r.name='IND_FC_STRAT';insert into r_result_val(value, result_id) select '3.7', r.id from r_result r where r.name='IND_FC_STRAT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.7' and r.name='IND_FC_STRAT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.1' and r.name='IND_FC_STRAT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.7' and r.name='IND_FC_STRAT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('IND_MU_LIGHTSOD');insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='IND_MU_LIGHTSOD';insert into r_result_val(value, result_id) select '3300', r.id from r_result r where r.name='IND_MU_LIGHTSOD';insert into r_result_val(value, result_id) select '5300', r.id from r_result r where r.name='IND_MU_LIGHTSOD'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='1')    or (i.name='MFUNC' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='2')    or (i.name='MFUNC' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5300' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='3')    or (i.name='MFUNC' and iv.value='1')     );insert into r_result_val(value, result_id) select '3200', r.id from r_result r where r.name='IND_MU_LIGHTSOD';insert into r_result_val(value, result_id) select '6200', r.id from r_result r where r.name='IND_MU_LIGHTSOD';insert into r_result_val(value, result_id) select '9800', r.id from r_result r where r.name='IND_MU_LIGHTSOD'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='1')    or (i.name='MFUNC' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6200' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='2')    or (i.name='MFUNC' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9800' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='3')    or (i.name='MFUNC' and iv.value='2')     );insert into r_result_val(value, result_id) select '3900', r.id from r_result r where r.name='IND_MU_LIGHTSOD';insert into r_result_val(value, result_id) select '7600', r.id from r_result r where r.name='IND_MU_LIGHTSOD';insert into r_result_val(value, result_id) select '12000', r.id from r_result r where r.name='IND_MU_LIGHTSOD'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='1')    or (i.name='MFUNC' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7600' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='2')    or (i.name='MFUNC' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='12000' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='3')    or (i.name='MFUNC' and iv.value='3')     );insert into r_result_val(value, result_id) select '5300', r.id from r_result r where r.name='IND_MU_LIGHTSOD';insert into r_result_val(value, result_id) select '10000', r.id from r_result r where r.name='IND_MU_LIGHTSOD';insert into r_result_val(value, result_id) select '17000', r.id from r_result r where r.name='IND_MU_LIGHTSOD'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5300' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='1')    or (i.name='MFUNC' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='10000' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='2')    or (i.name='MFUNC' and iv.value='4')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='17000' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='PLIGHTSOD' and iv.value='3')    or (i.name='MFUNC' and iv.value='4')     );insert into r_result(name) values('P3_FEN_MU');insert into r_result_val(value, result_id) select '5200', r.id from r_result r where r.name='P3_FEN_MU';insert into r_result_val(value, result_id) select '4200', r.id from r_result r where r.name='P3_FEN_MU';insert into r_result_val(value, result_id) select '2800', r.id from r_result r where r.name='P3_FEN_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5200' and r.name='P3_FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4200' and r.name='P3_FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='P3_FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '8200', r.id from r_result r where r.name='P3_FEN_MU';insert into r_result_val(value, result_id) select '6700', r.id from r_result r where r.name='P3_FEN_MU';insert into r_result_val(value, result_id) select '4500', r.id from r_result r where r.name='P3_FEN_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='8200' and r.name='P3_FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6700' and r.name='P3_FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4500' and r.name='P3_FEN_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_PROG_MU_M');insert into r_result_val(value, result_id) select '11600', r.id from r_result r where r.name='P3_PROG_MU_M';insert into r_result_val(value, result_id) select '9500', r.id from r_result r where r.name='P3_PROG_MU_M';insert into r_result_val(value, result_id) select '6300', r.id from r_result r where r.name='P3_PROG_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='11600' and r.name='P3_PROG_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9500' and r.name='P3_PROG_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6300' and r.name='P3_PROG_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '14200', r.id from r_result r where r.name='P3_PROG_MU_M';insert into r_result_val(value, result_id) select '11600', r.id from r_result r where r.name='P3_PROG_MU_M';insert into r_result_val(value, result_id) select '7700', r.id from r_result r where r.name='P3_PROG_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='14200' and r.name='P3_PROG_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='11600' and r.name='P3_PROG_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7700' and r.name='P3_PROG_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_PROG_MU_A_I');insert into r_result_val(value, result_id) select '4300', r.id from r_result r where r.name='P3_PROG_MU_A_I';insert into r_result_val(value, result_id) select '3500', r.id from r_result r where r.name='P3_PROG_MU_A_I';insert into r_result_val(value, result_id) select '2300', r.id from r_result r where r.name='P3_PROG_MU_A_I'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4300' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3500' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '6600', r.id from r_result r where r.name='P3_PROG_MU_A_I';insert into r_result_val(value, result_id) select '5400', r.id from r_result r where r.name='P3_PROG_MU_A_I';insert into r_result_val(value, result_id) select '3600', r.id from r_result r where r.name='P3_PROG_MU_A_I'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6600' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5400' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_ISOC_MU');insert into r_result_val(value, result_id) select '1500', r.id from r_result r where r.name='P3_ISOC_MU';insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='P3_ISOC_MU';insert into r_result_val(value, result_id) select '800', r.id from r_result r where r.name='P3_ISOC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='P3_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='800' and r.name='P3_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '2300', r.id from r_result r where r.name='P3_ISOC_MU';insert into r_result_val(value, result_id) select '1900', r.id from r_result r where r.name='P3_ISOC_MU';insert into r_result_val(value, result_id) select '1300', r.id from r_result r where r.name='P3_ISOC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='P3_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_ISOM_MU');insert into r_result_val(value, result_id) select '2400', r.id from r_result r where r.name='P3_ISOM_MU';insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='P3_ISOM_MU';insert into r_result_val(value, result_id) select '1300', r.id from r_result r where r.name='P3_ISOM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='P3_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '3800', r.id from r_result r where r.name='P3_ISOM_MU';insert into r_result_val(value, result_id) select '3100', r.id from r_result r where r.name='P3_ISOM_MU';insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='P3_ISOM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3800' and r.name='P3_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='P3_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='P3_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_ISOP_MU');insert into r_result_val(value, result_id) select '2900', r.id from r_result r where r.name='P3_ISOP_MU';insert into r_result_val(value, result_id) select '2400', r.id from r_result r where r.name='P3_ISOP_MU';insert into r_result_val(value, result_id) select '1600', r.id from r_result r where r.name='P3_ISOP_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='P3_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='P3_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '4600', r.id from r_result r where r.name='P3_ISOP_MU';insert into r_result_val(value, result_id) select '3800', r.id from r_result r where r.name='P3_ISOP_MU';insert into r_result_val(value, result_id) select '2500', r.id from r_result r where r.name='P3_ISOP_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4600' and r.name='P3_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3800' and r.name='P3_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='P3_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_ISOT_MU');insert into r_result_val(value, result_id) select '1400', r.id from r_result r where r.name='P3_ISOT_MU';insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='P3_ISOT_MU';insert into r_result_val(value, result_id) select '800', r.id from r_result r where r.name='P3_ISOT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='800' and r.name='P3_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '2200', r.id from r_result r where r.name='P3_ISOT_MU';insert into r_result_val(value, result_id) select '1800', r.id from r_result r where r.name='P3_ISOT_MU';insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='P3_ISOT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='P3_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_CHAUD_MU');insert into r_result_val(value, result_id) select '76300', r.id from r_result r where r.name='P3_CHAUD_MU';insert into r_result_val(value, result_id) select '64500', r.id from r_result r where r.name='P3_CHAUD_MU';insert into r_result_val(value, result_id) select '46500', r.id from r_result r where r.name='P3_CHAUD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='76300' and r.name='P3_CHAUD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='LOG' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='64500' and r.name='P3_CHAUD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='LOG' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='46500' and r.name='P3_CHAUD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='LOG' and iv.value='1')     );insert into r_result_val(value, result_id) select '40300', r.id from r_result r where r.name='P3_CHAUD_MU';insert into r_result_val(value, result_id) select '34400', r.id from r_result r where r.name='P3_CHAUD_MU';insert into r_result_val(value, result_id) select '25800', r.id from r_result r where r.name='P3_CHAUD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='40300' and r.name='P3_CHAUD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='LOG' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='34400' and r.name='P3_CHAUD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='LOG' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='25800' and r.name='P3_CHAUD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='LOG' and iv.value='2')     );insert into r_result(name) values('P3_CHAUD_COL_MU');insert into r_result_val(value, result_id) select '47500', r.id from r_result r where r.name='P3_CHAUD_COL_MU';insert into r_result_val(value, result_id) select '40900', r.id from r_result r where r.name='P3_CHAUD_COL_MU';insert into r_result_val(value, result_id) select '30500', r.id from r_result r where r.name='P3_CHAUD_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='47500' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_POWERCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='40900' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_POWERCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='30500' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_POWERCLASS' and iv.value='1')     );insert into r_result_val(value, result_id) select '50100', r.id from r_result r where r.name='P3_CHAUD_COL_MU';insert into r_result_val(value, result_id) select '43200', r.id from r_result r where r.name='P3_CHAUD_COL_MU';insert into r_result_val(value, result_id) select '32100', r.id from r_result r where r.name='P3_CHAUD_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='50100' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_POWERCLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='43200' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_POWERCLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='32100' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_POWERCLASS' and iv.value='2')     );insert into r_result(name) values('P3_FERM_MU');insert into r_result_val(value, result_id) select '800', r.id from r_result r where r.name='P3_FERM_MU';insert into r_result_val(value, result_id) select '660', r.id from r_result r where r.name='P3_FERM_MU';insert into r_result_val(value, result_id) select '440', r.id from r_result r where r.name='P3_FERM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='800' and r.name='P3_FERM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='660' and r.name='P3_FERM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='440' and r.name='P3_FERM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '1300', r.id from r_result r where r.name='P3_FERM_MU';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='P3_FERM_MU';insert into r_result_val(value, result_id) select '690', r.id from r_result r where r.name='P3_FERM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_FERM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_FERM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='690' and r.name='P3_FERM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_TER_ISOC_MU');insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='P3_TER_ISOC_MU';insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='P3_TER_ISOC_MU';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='P3_TER_ISOC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '3300', r.id from r_result r where r.name='P3_TER_ISOC_MU';insert into r_result_val(value, result_id) select '2700', r.id from r_result r where r.name='P3_TER_ISOC_MU';insert into r_result_val(value, result_id) select '1800', r.id from r_result r where r.name='P3_TER_ISOC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('P3_TER_ISOM_MU');insert into r_result_val(value, result_id) select '3400', r.id from r_result r where r.name='P3_TER_ISOM_MU';insert into r_result_val(value, result_id) select '2800', r.id from r_result r where r.name='P3_TER_ISOM_MU';insert into r_result_val(value, result_id) select '1900', r.id from r_result r where r.name='P3_TER_ISOM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '5400', r.id from r_result r where r.name='P3_TER_ISOM_MU';insert into r_result_val(value, result_id) select '4400', r.id from r_result r where r.name='P3_TER_ISOM_MU';insert into r_result_val(value, result_id) select '3000', r.id from r_result r where r.name='P3_TER_ISOM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5400' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4400' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3000' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('P3_TER_ISOP_MU');insert into r_result_val(value, result_id) select '4200', r.id from r_result r where r.name='P3_TER_ISOP_MU';insert into r_result_val(value, result_id) select '3400', r.id from r_result r where r.name='P3_TER_ISOP_MU';insert into r_result_val(value, result_id) select '2300', r.id from r_result r where r.name='P3_TER_ISOP_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4200' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '6600', r.id from r_result r where r.name='P3_TER_ISOP_MU';insert into r_result_val(value, result_id) select '5400', r.id from r_result r where r.name='P3_TER_ISOP_MU';insert into r_result_val(value, result_id) select '3600', r.id from r_result r where r.name='P3_TER_ISOP_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6600' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5400' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('P3_TER_ISOT_MU');insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='P3_TER_ISOT_MU';insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='P3_TER_ISOT_MU';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='P3_TER_ISOT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );
insert into r_result_val(value, result_id) select '3200', r.id from r_result r where r.name='P3_TER_ISOT_MU';insert into r_result_val(value, result_id) select '2600', r.id from r_result r where r.name='P3_TER_ISOT_MU';insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='P3_TER_ISOT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('P3_TER_ISOF_MU');insert into r_result_val(value, result_id) select '4000', r.id from r_result r where r.name='P3_TER_ISOF_MU';insert into r_result_val(value, result_id) select '3200', r.id from r_result r where r.name='P3_TER_ISOF_MU';insert into r_result_val(value, result_id) select '2200', r.id from r_result r where r.name='P3_TER_ISOF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into r_result_val(value, result_id) select '6300', r.id from r_result r where r.name='P3_TER_ISOF_MU';insert into r_result_val(value, result_id) select '5100', r.id from r_result r where r.name='P3_TER_ISOF_MU';insert into r_result_val(value, result_id) select '3400', r.id from r_result r where r.name='P3_TER_ISOF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6300' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5100' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into r_result(name) values('P3_TER_PAC_MU_1');insert into r_result_val(value, result_id) select '420', r.id from r_result r where r.name='P3_TER_PAC_MU_1';insert into r_result_val(value, result_id) select '350', r.id from r_result r where r.name='P3_TER_PAC_MU_1';insert into r_result_val(value, result_id) select '230', r.id from r_result r where r.name='P3_TER_PAC_MU_1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='420' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_COPECLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='350' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_COPECLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='230' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_COPECLASS' and iv.value='1')     );insert into r_result_val(value, result_id) select '560', r.id from r_result r where r.name='P3_TER_PAC_MU_1';insert into r_result_val(value, result_id) select '460', r.id from r_result r where r.name='P3_TER_PAC_MU_1';insert into r_result_val(value, result_id) select '310', r.id from r_result r where r.name='P3_TER_PAC_MU_1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='560' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_COPECLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='460' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_COPECLASS' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='310' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_COPECLASS' and iv.value='2')     );insert into r_result(name) values('P3_TER_PAC_MU_2');insert into r_result_val(value, result_id) select '310', r.id from r_result r where r.name='P3_TER_PAC_MU_2';insert into r_result_val(value, result_id) select '250', r.id from r_result r where r.name='P3_TER_PAC_MU_2';insert into r_result_val(value, result_id) select '170', r.id from r_result r where r.name='P3_TER_PAC_MU_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='310' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_ETASCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='250' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_ETASCLASS' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='170' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_ETASCLASS' and iv.value='1')     );insert into r_result_val(value, result_id) select '410', r.id from r_result r where r.name='';insert into r_result_val(value, result_id) select '330', r.id from r_result r where r.name='';insert into r_result_val(value, result_id) select '220', r.id from r_result r where r.name=''; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='410' and r.name='' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='P3_TER_PAC_MU_2' and iv.value='')    or (i.name='ZONE' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='330' and r.name='' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='P3_TER_PAC_MU_2' and iv.value='')    or (i.name='ZONE' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='220' and r.name='' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='P3_TER_PAC_MU_2' and iv.value='')    or (i.name='ZONE' and iv.value='2')     );insert into r_result_val(value, result_id) select '500', r.id from r_result r where r.name='P3_TER_PAC_MU_2';insert into r_result_val(value, result_id) select '410', r.id from r_result r where r.name='P3_TER_PAC_MU_2';insert into r_result_val(value, result_id) select '270', r.id from r_result r where r.name='P3_TER_PAC_MU_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='500' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_ETASCLASS' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='410' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_ETASCLASS' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='270' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_ETASCLASS' and iv.value='3')     );insert into r_result(name) values('P3_IND_COLD_REG_MU');insert into r_result_val(value, result_id) select '14300', r.id from r_result r where r.name='P3_IND_COLD_REG_MU';insert into r_result_val(value, result_id) select '14300', r.id from r_result r where r.name='P3_IND_COLD_REG_MU';insert into r_result_val(value, result_id) select '13500', r.id from r_result r where r.name='P3_IND_COLD_REG_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '11700', r.id from r_result r where r.name='P3_IND_COLD_REG_MU';insert into r_result_val(value, result_id) select '11700', r.id from r_result r where r.name='P3_IND_COLD_REG_MU';insert into r_result_val(value, result_id) select '10400', r.id from r_result r where r.name='P3_IND_COLD_REG_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_IND_DESTRAT_HLOC');insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='P3_IND_DESTRAT_HLOC';insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='P3_IND_DESTRAT_HLOC';insert into r_result_val(value, result_id) select '1.4', r.id from r_result r where r.name='P3_IND_DESTRAT_HLOC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='P3_IND_DESTRAT_HLOC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '2.7', r.id from r_result r where r.name='P3_IND_DESTRAT_HLOC';insert into r_result_val(value, result_id) select '3.1', r.id from r_result r where r.name='P3_IND_DESTRAT_HLOC';insert into r_result_val(value, result_id) select '3.7', r.id from r_result r where r.name='P3_IND_DESTRAT_HLOC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_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  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('TER_PACEE_MU');insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='TER_PACEE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '710', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '720', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '760', r.id from r_result r where r.name='TER_PACEE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='710' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '790', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '820', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '850', r.id from r_result r where r.name='TER_PACEE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='790' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='820' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='850' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '860', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '880', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '930', r.id from r_result r where r.name='TER_PACEE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='860' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='880' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='930' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '990', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='TER_PACEE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='990' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '710', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '720', r.id from r_result r where r.name='TER_PACEE_MU';insert into r_result_val(value, result_id) select '760', r.id from r_result r where r.name='TER_PACEE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='710' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_PACEE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('TER_PACEE_MUGT');insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '890', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '910', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '960', r.id from r_result r where r.name='TER_PACEE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='890' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='910' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='960' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '610', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '630', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '660', r.id from r_result r where r.name='TER_PACEE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='610' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='660' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '650', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '670', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '700', r.id from r_result r where r.name='TER_PACEE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='650' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='670' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='700' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '580', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '600', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '630', r.id from r_result r where r.name='TER_PACEE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='580' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '940', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '970', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='TER_PACEE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='940' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='970' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '580', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '600', r.id from r_result r where r.name='TER_PACEE_MUGT';insert into r_result_val(value, result_id) select '630', r.id from r_result r where r.name='TER_PACEE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='580' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_PACEE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('TER_PACAE_MU');insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='TER_PACAE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '670', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '680', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '720', r.id from r_result r where r.name='TER_PACAE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='670' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='680' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '750', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '770', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '800', r.id from r_result r where r.name='TER_PACAE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='750' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='770' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='800' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '820', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '840', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '880', r.id from r_result r where r.name='TER_PACAE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='820' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='840' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='880' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '940', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '960', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='TER_PACAE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='940' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='960' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '670', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '680', r.id from r_result r where r.name='TER_PACAE_MU';insert into r_result_val(value, result_id) select '720', r.id from r_result r where r.name='TER_PACAE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='670' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='680' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_PACAE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('TER_PACAE_MUGT');insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '840', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '870', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '910', r.id from r_result r where r.name='TER_PACAE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='840' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='870' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='910' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '580', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '600', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '630', r.id from r_result r where r.name='TER_PACAE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='580' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '620', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '640', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '670', r.id from r_result r where r.name='TER_PACAE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='620' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='640' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='670' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '550', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '570', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '600', r.id from r_result r where r.name='TER_PACAE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='550' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='570' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '890', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '920', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '960', r.id from r_result r where r.name='TER_PACAE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='890' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='920' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='960' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '550', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '570', r.id from r_result r where r.name='TER_PACAE_MUGT';insert into r_result_val(value, result_id) select '600', r.id from r_result r where r.name='TER_PACAE_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='550' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='570' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_PACAE_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_IND_ISOPOINT_MU');insert into r_result_val(value, result_id) select '18400', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '3600', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '7100', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '19700', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='18400' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7100' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='19700' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '40400', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '8000', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '15600', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '43400', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='40400' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='8000' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='15600' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='43400' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '55100', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '10900', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '21300', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '59200', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='55100' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='10900' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='21300' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='59200' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '77200', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '15200', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '29900', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU';insert into r_result_val(value, result_id) select '82900', r.id from r_result r where r.name='P3_IND_ISOPOINT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='77200' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='15200' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='29900' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='82900' and r.name='P3_IND_ISOPOINT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('P3_IND_PRESSE_MU');insert into r_result_val(value, result_id) select '14200', r.id from r_result r where r.name='P3_IND_PRESSE_MU';insert into r_result_val(value, result_id) select '28300', r.id from r_result r where r.name='P3_IND_PRESSE_MU';insert into r_result_val(value, result_id) select '42500', r.id from r_result r where r.name='P3_IND_PRESSE_MU';insert into r_result_val(value, result_id) select '60200', r.id from r_result r where r.name='P3_IND_PRESSE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='14200' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='28300' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='42500' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='60200' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '9100', r.id from r_result r where r.name='P3_IND_PRESSE_MU';insert into r_result_val(value, result_id) select '18200', r.id from r_result r where r.name='P3_IND_PRESSE_MU';insert into r_result_val(value, result_id) select '27300', r.id from r_result r where r.name='P3_IND_PRESSE_MU';insert into r_result_val(value, result_id) select '38700', r.id from r_result r where r.name='P3_IND_PRESSE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9100' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='18200' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='27300' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='38700' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '4900', r.id from r_result r where r.name='P3_IND_PRESSE_MU';insert into r_result_val(value, result_id) select '9800', r.id from r_result r where r.name='P3_IND_PRESSE_MU';insert into r_result_val(value, result_id) select '14800', r.id from r_result r where r.name='P3_IND_PRESSE_MU';insert into r_result_val(value, result_id) select '20900', r.id from r_result r where r.name='P3_IND_PRESSE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4900' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9800' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='14800' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='20900' and r.name='P3_IND_PRESSE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('IND_MU_VEV');insert into r_result_val(value, result_id) select '17000', r.id from r_result r where r.name='IND_MU_VEV';insert into r_result_val(value, result_id) select '21000', r.id from r_result r where r.name='IND_MU_VEV';insert into r_result_val(value, result_id) select '8100', r.id from r_result r where r.name='IND_MU_VEV';insert into r_result_val(value, result_id) select '9800', r.id from r_result r where r.name='IND_MU_VEV';insert into r_result_val(value, result_id) select '7500', r.id from r_result r where r.name='IND_MU_VEV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='17000' and r.name='IND_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='21000' and r.name='IND_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='8100' and r.name='IND_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9800' and r.name='IND_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7500' and r.name='IND_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '28000', r.id from r_result r where r.name='IND_MU_VEV';insert into r_result_val(value, result_id) select '28000', r.id from r_result r where r.name='IND_MU_VEV';insert into r_result_val(value, result_id) select '13000', r.id from r_result r where r.name='IND_MU_VEV';insert into r_result_val(value, result_id) select '12000', r.id from r_result r where r.name='IND_MU_VEV';insert into r_result_val(value, result_id) select '13000', r.id from r_result r where r.name='IND_MU_VEV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='28000' and r.name='IND_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='28000' and r.name='IND_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='13000' and r.name='IND_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='12000' and r.name='IND_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='13000' and r.name='IND_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('PAC_AA_MU');insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '120000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '98000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '65000', r.id from r_result r where r.name='PAC_AA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='120000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='98000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='65000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '130000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '100000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '69000', r.id from r_result r where r.name='PAC_AA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='130000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='100000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='69000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '47000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '38000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '25000', r.id from r_result r where r.name='PAC_AA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='47000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='38000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='25000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '50000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '40000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '27000', r.id from r_result r where r.name='PAC_AA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='50000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='40000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='27000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '47000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '38000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '25000', r.id from r_result r where r.name='PAC_AA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='47000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='38000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='25000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '50000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '40000', r.id from r_result r where r.name='PAC_AA_MU';insert into r_result_val(value, result_id) select '27000', r.id from r_result r where r.name='PAC_AA_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='50000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='40000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='27000' and r.name='PAC_AA_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('PAC_EE_MU');insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '160000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '130000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '84000', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='160000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='130000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='84000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '160000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '130000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '87000', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='160000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='130000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='87000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '170000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '140000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '91000', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='170000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='140000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='91000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '64000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '53000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '35000', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='64000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='53000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='35000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '67000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '54000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '36000', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='67000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='54000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='36000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '69000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '57000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '38000', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='69000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='57000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='38000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '64000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '53000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '35000', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='64000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='53000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='35000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '67000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '54000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '36000', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='67000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='54000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='36000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '69000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '57000', r.id from r_result r where r.name='PAC_EE_MU';insert into r_result_val(value, result_id) select '38000', r.id from r_result r where r.name='PAC_EE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='69000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='57000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='38000' and r.name='PAC_EE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('PAC_AE_MU');insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '150000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '120000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '80000', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='150000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='120000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='80000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '150000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '120000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '83000', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='150000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='120000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='83000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '160000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '130000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '86000', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='160000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='130000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='86000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '61000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '50000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '33000', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='61000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='50000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='33000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '63000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '52000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '35000', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='63000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='52000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='35000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '66000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '54000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '36000', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='66000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='54000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='36000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '61000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '50000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '33000', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='61000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='50000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='33000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '63000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '52000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '35000', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='63000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='52000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='35000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '66000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '54000', r.id from r_result r where r.name='PAC_AE_MU';insert into r_result_val(value, result_id) select '36000', r.id from r_result r where r.name='PAC_AE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='66000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='54000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='36000' and r.name='PAC_AE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('RAD_MU');insert into r_result_val(value, result_id) select '2600', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '1500', r.id from r_result r where r.name='RAD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '2600', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '1500', r.id from r_result r where r.name='RAD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '1800', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '1500', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='RAD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '2600', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '2200', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '1400', r.id from r_result r where r.name='RAD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '1800', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '1500', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='RAD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '2600', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '2200', r.id from r_result r where r.name='RAD_MU';insert into r_result_val(value, result_id) select '1400', r.id from r_result r where r.name='RAD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('ROB_MU');insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '950', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '640', r.id from r_result r where r.name='ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='950' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='640' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '950', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '640', r.id from r_result r where r.name='ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='950' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='640' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '830', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '660', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '440', r.id from r_result r where r.name='ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='830' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='660' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='440' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '950', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '640', r.id from r_result r where r.name='ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='950' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='640' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '830', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '660', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '440', r.id from r_result r where r.name='ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='830' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='660' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='440' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '950', r.id from r_result r where r.name='ROB_MU';insert into r_result_val(value, result_id) select '640', r.id from r_result r where r.name='ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='950' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='640' and r.name='ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('VMC_DF_MU');insert into r_result_val(value, result_id) select '19850', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '16250', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '10800', r.id from r_result r where r.name='VMC_DF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='19850' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='16250' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='10800' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '36150', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '29600', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '19750', r.id from r_result r where r.name='VMC_DF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='36150' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='29600' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='19750' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '13350', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '10900', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '7250', r.id from r_result r where r.name='VMC_DF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='13350' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='10900' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7250' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '24050', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '19700', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '13150', r.id from r_result r where r.name='VMC_DF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='24050' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='19700' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='13150' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '13350', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '10900', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '7250', r.id from r_result r where r.name='VMC_DF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='13350' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='10900' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7250' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '24050', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '19700', r.id from r_result r where r.name='VMC_DF_MU';insert into r_result_val(value, result_id) select '13150', r.id from r_result r where r.name='VMC_DF_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='24050' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='19700' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='13150' and r.name='VMC_DF_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result(name) values('VMC_SF_AG_MU');insert into r_result_val(value, result_id) select '17000', r.id from r_result r where r.name='VMC_SF_AG_MU';insert into r_result_val(value, result_id) select '14000', r.id from r_result r where r.name='VMC_SF_AG_MU';insert into r_result_val(value, result_id) select '9500', r.id from r_result r where r.name='VMC_SF_AG_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='17000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='14000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_result_val(value, result_id) select '30000', r.id from r_result r where r.name='VMC_SF_AG_MU';insert into r_result_val(value, result_id) select '24500', r.id from r_result r where r.name='VMC_SF_AG_MU';insert into r_result_val(value, result_id) select '16000', r.id from r_result r where r.name='VMC_SF_AG_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='30000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='24500' and r.name='VMC_SF_AG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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 r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='16000' and r.name='VMC_SF_AG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_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')  );
