insert into result_val(value, result_id) select '2900', r.id from result r where r.name='P3_FORM_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='P3_FORM_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_FORMTYPE2' and iv.value='1')  );insert into result_val(value, result_id) select '2400', r.id from result r where r.name='P3_FORM_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='P3_FORM_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_FORMTYPE2' and iv.value='2')  );insert into result(name) values('P3_STATION_MU');insert into result_val(value, result_id) select '534200', r.id from result r where r.name='P3_STATION_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='534200' and r.name='P3_STATION_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_TYPESTA' and iv.value='1')  );insert into result_val(value, result_id) select '148400', r.id from result r where r.name='P3_STATION_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='148400' and r.name='P3_STATION_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_TYPESTA' and iv.value='2')  );insert into result_val(value, result_id) select '39600', r.id from result r where r.name='P3_STATION_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='39600' and r.name='P3_STATION_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_TYPESTA' and iv.value='3')  );insert into result(name) values('P3_CAR_MU');insert into result_val(value, result_id) select '4700', r.id from result r where r.name='P3_CAR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='P3_CAR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_CARTYPE' and iv.value='1')  );insert into result_val(value, result_id) select '1700', r.id from result r where r.name='P3_CAR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_CAR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_CARTYPE' and iv.value='2')  );insert into result(name) values('P3_CAR_MU_2');insert into result_val(value, result_id) select '3900', r.id from result r where r.name='P3_CAR_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='P3_CAR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_CARTYPE' and iv.value='1')  );insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_CAR_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_CAR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_CARTYPE' and iv.value='2')  );insert into result(name) values('P3_CARCAT_MU');insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_CARCAT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_CARCAT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_CARCAT' and iv.value='1')  );insert into result_val(value, result_id) select '2700', r.id from result r where r.name='P3_CARCAT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='P3_CARCAT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_CARCAT' and iv.value='2')  );insert into result_val(value, result_id) select '27000', r.id from result r where r.name='P3_CARCAT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='27000' and r.name='P3_CARCAT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_CARCAT' and iv.value='3')  );insert into result_val(value, result_id) select '19900', r.id from result r where r.name='P3_CARCAT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19900' and r.name='P3_CARCAT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_CARCAT' and iv.value='4')  );insert into result(name) values('P3_ENGINE_MU');insert into result_val(value, result_id) select '4700', r.id from result r where r.name='P3_ENGINE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='P3_ENGINE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_TYPE_ENGINE' and iv.value='1')  );insert into result_val(value, result_id) select '4700', r.id from result r where r.name='P3_ENGINE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='P3_ENGINE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_TYPE_ENGINE' and iv.value='2')  );insert into result_val(value, result_id) select '4400', r.id from result r where r.name='P3_ENGINE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4400' and r.name='P3_ENGINE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_TYPE_ENGINE' and iv.value='3')  );insert into result(name) values('P3_ENGINE_MU_2');insert into result_val(value, result_id) select '1900', r.id from result r where r.name='P3_ENGINE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='P3_ENGINE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_TYPE_ENGINE' and iv.value='1')  );insert into result_val(value, result_id) select '1900', r.id from result r where r.name='P3_ENGINE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='P3_ENGINE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_TYPE_ENGINE' and iv.value='2')  );insert into result_val(value, result_id) select '820', r.id from result r where r.name='P3_ENGINE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='820' and r.name='P3_ENGINE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_TYPE_ENGINE' and iv.value='3')  );insert into result(name) values('IND_ZONE');insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='1')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='2')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='3')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='4')  );insert into result_val(value, result_id) select '4', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='5')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='6')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='7')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='8')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='9')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='10')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='11')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='12')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='13')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='14')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='15')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='16')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='17')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='18')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='19')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='20')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='21')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='22')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='23')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='24')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='25')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='26')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='27')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='28')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='29')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='30')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='31')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='32')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='33')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='34')  );insert into result_val(value, result_id) select '4', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='35')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='36')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='37')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='38')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='39')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='40')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='41')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='42')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='43')  );
insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='44')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='45')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='46')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='47')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='48')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='49')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='50')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='51')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='52')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='53')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='54')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='55')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='56')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='57')  );insert into result_val(value, result_id) select '4', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='58')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='59')  );insert into result_val(value, result_id) select '4', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='60')  );insert into result_val(value, result_id) select '4', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='61')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='62')  );insert into result_val(value, result_id) select '4', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='63')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='64')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='65')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='66')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='67')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='68')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='69')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='70')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='71')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='72')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='73')  );insert into result_val(value, result_id) select '4', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='74')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='75')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='76')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='77')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='78')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='79')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='80')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='81')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='82')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='83')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='84')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='85')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='86')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='87')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='88')  );insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='89')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='90')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='91')  );insert into result_val(value, result_id) select '4', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='92')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='93')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='94')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='95')  );insert into result_val(value, result_id) select '2', r.id from result r where r.name='IND_ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2' and r.name='IND_ZONE' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='96')  );insert into result(name) values('P3_BRU_MU');insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_BRU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_BRU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='TEMPERATURE' and iv.value='1')  );insert into result_val(value, result_id) select '2500', r.id from result r where r.name='P3_BRU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='P3_BRU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='TEMPERATURE' and iv.value='2')  );insert into result_val(value, result_id) select '4100', r.id from result r where r.name='P3_BRU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4100' and r.name='P3_BRU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='TEMPERATURE' and iv.value='3')  );insert into result_val(value, result_id) select '5800', r.id from result r where r.name='P3_BRU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5800' and r.name='P3_BRU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='TEMPERATURE' and iv.value='4')  );insert into result(name) values('P3_BRU_MU_2');insert into result_val(value, result_id) select '2300', r.id from result r where r.name='P3_BRU_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_BRU_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='TEMPERATURE' and iv.value='1')  );insert into result_val(value, result_id) select '3500', r.id from result r where r.name='P3_BRU_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3500' and r.name='P3_BRU_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='TEMPERATURE' and iv.value='2')  );insert into result_val(value, result_id) select '5600', r.id from result r where r.name='P3_BRU_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5600' and r.name='P3_BRU_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='TEMPERATURE' and iv.value='3')  );insert into result_val(value, result_id) select '7800', r.id from result r where r.name='P3_BRU_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7800' and r.name='P3_BRU_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='TEMPERATURE' and iv.value='4')  );insert into result(name) values('P3_BRU_MU_3');
insert into result_val(value, result_id) select '100', r.id from result r where r.name='P3_BRU_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='100' and r.name='P3_BRU_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into result_val(value, result_id) select '2300', r.id from result r where r.name='P3_BRU_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_BRU_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into result_val(value, result_id) select '3100', r.id from result r where r.name='P3_BRU_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='P3_BRU_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into result_val(value, result_id) select '4300', r.id from result r where r.name='P3_BRU_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4300' and r.name='P3_BRU_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );insert into result(name) values('P3_IND_FC');insert into result_val(value, result_id) select '1', r.id from result r where r.name='P3_IND_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='P3_IND_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into result_val(value, result_id) select '2.2', r.id from result r where r.name='P3_IND_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.2' and r.name='P3_IND_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into result_val(value, result_id) select '3', r.id from result r where r.name='P3_IND_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3' and r.name='P3_IND_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into result_val(value, result_id) select '4.2', r.id from result r where r.name='P3_IND_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4.2' and r.name='P3_IND_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );insert into result(name) values('P3_FRIG_EAU_MU');insert into result_val(value, result_id) select '680', r.id from result r where r.name='P3_FRIG_EAU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='680' and r.name='P3_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTEAU' and iv.value='29')  );insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_FRIG_EAU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTEAU' and iv.value='28')  );insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_FRIG_EAU_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_FRIG_EAU_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTEAU' and iv.value='27')  );insert into result(name) values('P3_FRIG_ASEC_MU');insert into result_val(value, result_id) select '790', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='790' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='13')  );insert into result_val(value, result_id) select '1100', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='12')  );insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='11')  );insert into result_val(value, result_id) select '1700', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='10')  );insert into result_val(value, result_id) select '2000', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='9')  );insert into result_val(value, result_id) select '2400', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='8')  );insert into result_val(value, result_id) select '2800', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='7')  );insert into result_val(value, result_id) select '3100', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='6')  );insert into result_val(value, result_id) select '3600', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='5')  );insert into result_val(value, result_id) select '4000', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='4')  );insert into result_val(value, result_id) select '4400', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4400' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='3')  );insert into result_val(value, result_id) select '4900', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4900' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='2')  );insert into result_val(value, result_id) select '5400', r.id from result r where r.name='P3_FRIG_ASEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5400' and r.name='P3_FRIG_ASEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTASEC' and iv.value='1')  );insert into result(name) values('P3_FRIG_AHUM_MU');insert into result_val(value, result_id) select '790', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='790' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='26')  );insert into result_val(value, result_id) select '1100', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='25')  );insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='24')  );insert into result_val(value, result_id) select '1700', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='23')  );insert into result_val(value, result_id) select '2000', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='22')  );insert into result_val(value, result_id) select '2400', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='21')  );insert into result_val(value, result_id) select '2800', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='20')  );insert into result_val(value, result_id) select '3100', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='19')  );insert into result_val(value, result_id) select '3600', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='18')  );insert into result_val(value, result_id) select '4000', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='17')  );insert into result_val(value, result_id) select '4400', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4400' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='16')  );insert into result_val(value, result_id) select '4900', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4900' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='15')  );insert into result_val(value, result_id) select '5400', r.id from result r where r.name='P3_FRIG_AHUM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5400' and r.name='P3_FRIG_AHUM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='DTAHUM' and iv.value='14')  ); insert into result(name) values('P3_SECTOR_MU');  insert into result_val(value, result_id) select '86800', r.id from result r where r.name='P3_SECTOR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='86800' and r.name='P3_SECTOR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_SECTOR' and iv.value='1')  );insert into result_val(value, result_id) select '71100', r.id from result r where r.name='P3_SECTOR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='71100' and r.name='P3_SECTOR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_SECTOR' and iv.value='2')  );insert into result_val(value, result_id) select '20600', r.id from result r where r.name='P3_SECTOR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='20600' and r.name='P3_SECTOR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_SECTOR' and iv.value='3')  );insert into result(name) values('P3_RES_SH_MU');insert into result_val(value, result_id) select '260', r.id from result r where r.name='P3_RES_SH_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='260' and r.name='P3_RES_SH_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into result_val(value, result_id) select '180', r.id from result r where r.name='P3_RES_SH_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='P3_RES_SH_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into result_val(value, result_id) select '200', r.id from result r where r.name='P3_RES_SH_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='200' and r.name='P3_RES_SH_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into result_val(value, result_id) select '350', r.id from result r where r.name='P3_RES_SH_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='350' and r.name='P3_RES_SH_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into result_val(value, result_id) select '240', r.id from result r where r.name='P3_RES_SH_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='P3_RES_SH_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into result_val(value, result_id) select '180', r.id from result r where r.name='P3_RES_SH_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='P3_RES_SH_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into result(name) values('P3_RES_ZONE_FC');insert into result_val(value, result_id) select '1.1', r.id from result r where r.name='P3_RES_ZONE_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='P3_RES_ZONE_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into result_val(value, result_id) select '0.9', r.id from result r where r.name='P3_RES_ZONE_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='P3_RES_ZONE_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into result_val(value, result_id) select '0.6', r.id from result r where r.name='P3_RES_ZONE_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='P3_RES_ZONE_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into result(name) values('P3_NAPP_MU');insert into result_val(value, result_id) select '22400', r.id from result r where r.name='P3_NAPP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='22400' and r.name='P3_NAPP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into result_val(value, result_id) select '18900', r.id from result r where r.name='P3_NAPP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18900' and r.name='P3_NAPP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into result_val(value, result_id) select '13500', r.id from result r where r.name='P3_NAPP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13500' and r.name='P3_NAPP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into result(name) values('P3_IND_VEV_MU_REV2');
insert into result_val(value, result_id) select '12400', r.id from result r where r.name='P3_IND_VEV_MU_REV2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12400' and r.name='P3_IND_VEV_MU_REV2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_IND_APPVEV' and iv.value='1')  );insert into result_val(value, result_id) select '12200', r.id from result r where r.name='P3_IND_VEV_MU_REV2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12200' and r.name='P3_IND_VEV_MU_REV2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_IND_APPVEV' and iv.value='2')  );insert into result_val(value, result_id) select '11900', r.id from result r where r.name='P3_IND_VEV_MU_REV2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11900' and r.name='P3_IND_VEV_MU_REV2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_IND_APPVEV' and iv.value='3')  );insert into result_val(value, result_id) select '7100', r.id from result r where r.name='P3_IND_VEV_MU_REV2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7100' and r.name='P3_IND_VEV_MU_REV2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_IND_APPVEV' and iv.value='4')  );insert into result_val(value, result_id) select '5500', r.id from result r where r.name='P3_IND_VEV_MU_REV2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5500' and r.name='P3_IND_VEV_MU_REV2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_IND_APPVEV' and iv.value='5')  );insert into result(name) values('P3_NAPP_MU_1');insert into result_val(value, result_id) select '9800', r.id from result r where r.name='P3_NAPP_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9800' and r.name='P3_NAPP_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into result_val(value, result_id) select '8000', r.id from result r where r.name='P3_NAPP_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8000' and r.name='P3_NAPP_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into result_val(value, result_id) select '5300', r.id from result r where r.name='P3_NAPP_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5300' and r.name='P3_NAPP_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into result(name) values('P3_VEV_MU_2');insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_VEV_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_VEV_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='1')  );insert into result_val(value, result_id) select '19600', r.id from result r where r.name='P3_VEV_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19600' and r.name='P3_VEV_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='2')  );insert into result_val(value, result_id) select '11500', r.id from result r where r.name='P3_VEV_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11500' and r.name='P3_VEV_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='3')  );insert into result_val(value, result_id) select '2800', r.id from result r where r.name='P3_VEV_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='P3_VEV_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='4')  );insert into result_val(value, result_id) select '7700', r.id from result r where r.name='P3_VEV_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7700' and r.name='P3_VEV_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='5')  );insert into result_val(value, result_id) select '2300', r.id from result r where r.name='P3_VEV_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_VEV_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='6')  );insert into result(name) values('P3_TER_MU_VEV_2');insert into result_val(value, result_id) select '9600', r.id from result r where r.name='P3_TER_MU_VEV_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9600' and r.name='P3_TER_MU_VEV_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_APPVEV' and iv.value='1')  );insert into result_val(value, result_id) select '11400', r.id from result r where r.name='P3_TER_MU_VEV_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11400' and r.name='P3_TER_MU_VEV_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_APPVEV' and iv.value='2')  );insert into result_val(value, result_id) select '3900', r.id from result r where r.name='P3_TER_MU_VEV_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='P3_TER_MU_VEV_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_APPVEV' and iv.value='3')  );insert into result_val(value, result_id) select '990', r.id from result r where r.name='P3_TER_MU_VEV_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='990' and r.name='P3_TER_MU_VEV_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_APPVEV' and iv.value='4')  );insert into result_val(value, result_id) select '990', r.id from result r where r.name='P3_TER_MU_VEV_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='990' and r.name='P3_TER_MU_VEV_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_APPVEV' and iv.value='5')  );insert into result(name) values('P3_PUISSANCE_LED_MU_1');insert into result_val(value, result_id) select '210', r.id from result r where r.name='P3_PUISSANCE_LED_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='210' and r.name='P3_PUISSANCE_LED_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_PUISSANCE_LED' and iv.value='1')  );insert into result_val(value, result_id) select '330', r.id from result r where r.name='P3_PUISSANCE_LED_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='330' and r.name='P3_PUISSANCE_LED_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_PUISSANCE_LED' and iv.value='2')  );insert into result_val(value, result_id) select '510', r.id from result r where r.name='P3_PUISSANCE_LED_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='510' and r.name='P3_PUISSANCE_LED_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_PUISSANCE_LED' and iv.value='3')  );insert into result(name) values('P3_PUISSANCE_LED_MU_2');insert into result_val(value, result_id) select '150', r.id from result r where r.name='P3_PUISSANCE_LED_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150' and r.name='P3_PUISSANCE_LED_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_PUISSANCE_LED' and iv.value='1')  );insert into result_val(value, result_id) select '230', r.id from result r where r.name='P3_PUISSANCE_LED_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='230' and r.name='P3_PUISSANCE_LED_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_PUISSANCE_LED' and iv.value='2')  );insert into result_val(value, result_id) select '360', r.id from result r where r.name='P3_PUISSANCE_LED_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='360' and r.name='P3_PUISSANCE_LED_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='P3_PUISSANCE_LED' and iv.value='3')  );insert into result(name) values('P3_OPT_CAHUF_MU');insert into result_val(value, result_id) select '180', r.id from result r where r.name='P3_OPT_CAHUF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='P3_OPT_CAHUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into result_val(value, result_id) select '120', r.id from result r where r.name='P3_OPT_CAHUF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='120' and r.name='P3_OPT_CAHUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into result_val(value, result_id) select '130', r.id from result r where r.name='P3_OPT_CAHUF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='130' and r.name='P3_OPT_CAHUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into result_val(value, result_id) select '210', r.id from result r where r.name='P3_OPT_CAHUF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='210' and r.name='P3_OPT_CAHUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into result_val(value, result_id) select '150', r.id from result r where r.name='P3_OPT_CAHUF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150' and r.name='P3_OPT_CAHUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into result_val(value, result_id) select '120', r.id from result r where r.name='P3_OPT_CAHUF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='120' and r.name='P3_OPT_CAHUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into result(name) values('P3_CLIM_MU');insert into result_val(value, result_id) select '560', r.id from result r where r.name='P3_CLIM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='560' and r.name='P3_CLIM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into result_val(value, result_id) select '460', r.id from result r where r.name='P3_CLIM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='460' and r.name='P3_CLIM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into result_val(value, result_id) select '180', r.id from result r where r.name='P3_CLIM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='P3_CLIM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into result_val(value, result_id) select '340', r.id from result r where r.name='P3_CLIM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='340' and r.name='P3_CLIM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into result_val(value, result_id) select '210', r.id from result r where r.name='P3_CLIM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='210' and r.name='P3_CLIM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into result_val(value, result_id) select '180', r.id from result r where r.name='P3_CLIM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='P3_CLIM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into result(name) values('BAT_TYPE_MU');insert into result_val(value, result_id) select '270', r.id from result r where r.name='BAT_TYPE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='270' and r.name='BAT_TYPE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='BAT_TYPE' and iv.value='1')  );insert into result_val(value, result_id) select '240', r.id from result r where r.name='BAT_TYPE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='BAT_TYPE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='BAT_TYPE' and iv.value='2')  );insert into result(name) values('TYPE_CLIM_MU');insert into result_val(value, result_id) select '3600', r.id from result r where r.name='TYPE_CLIM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='TYPE_CLIM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='TYPE_CLIM' and iv.value='1')  );insert into result_val(value, result_id) select '310', r.id from result r where r.name='TYPE_CLIM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='310' and r.name='TYPE_CLIM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (  (i.name='TYPE_CLIM' and iv.value='2')  );
insert into result(name) values('ISOC_MU');insert into result_val(value, result_id) select '1200', r.id from result r where r.name='ISOC_MU';insert into result_val(value, result_id) select '980', r.id from result r where r.name='ISOC_MU';insert into result_val(value, result_id) select '660', r.id from result r where r.name='ISOC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='980' and r.name='ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='660' and r.name='ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '1900', r.id from result r where r.name='ISOC_MU';insert into result_val(value, result_id) select '1600', r.id from result r where r.name='ISOC_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='ISOC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('ISOM_MU');insert into result_val(value, result_id) select '1900', r.id from result r where r.name='ISOM_MU';insert into result_val(value, result_id) select '1600', r.id from result r where r.name='ISOM_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='ISOM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '3100', r.id from result r where r.name='ISOM_MU';insert into result_val(value, result_id) select '2500', r.id from result r where r.name='ISOM_MU';insert into result_val(value, result_id) select '1700', r.id from result r where r.name='ISOM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('ISOP_MU');insert into result_val(value, result_id) select '2400', r.id from result r where r.name='ISOP_MU';insert into result_val(value, result_id) select '2000', r.id from result r where r.name='ISOP_MU';insert into result_val(value, result_id) select '1300', r.id from result r where r.name='ISOP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '3800', r.id from result r where r.name='ISOP_MU';insert into result_val(value, result_id) select '3100', r.id from result r where r.name='ISOP_MU';insert into result_val(value, result_id) select '2100', r.id from result r where r.name='ISOP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3800' and r.name='ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('FEN_MU');insert into result_val(value, result_id) select '3900', r.id from result r where r.name='FEN_MU';insert into result_val(value, result_id) select '3200', r.id from result r where r.name='FEN_MU';insert into result_val(value, result_id) select '2000', r.id from result r where r.name='FEN_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '6100', r.id from result r where r.name='FEN_MU';insert into result_val(value, result_id) select '5000', r.id from result r where r.name='FEN_MU';insert into result_val(value, result_id) select '3400', r.id from result r where r.name='FEN_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6100' and r.name='FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('ISOT_MediumRT_MU');insert into result_val(value, result_id) select '550', r.id from result r where r.name='ISOT_MediumRT_MU';insert into result_val(value, result_id) select '450', r.id from result r where r.name='ISOT_MediumRT_MU';insert into result_val(value, result_id) select '300', r.id from result r where r.name='ISOT_MediumRT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='550' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='450' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='300' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '880', r.id from result r where r.name='ISOT_MediumRT_MU';insert into result_val(value, result_id) select '720', r.id from result r where r.name='ISOT_MediumRT_MU';insert into result_val(value, result_id) select '480', r.id from result r where r.name='ISOT_MediumRT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='880' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='720' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='480' and r.name='ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('ISOT_BigRT_MU');insert into result_val(value, result_id) select '1200', r.id from result r where r.name='ISOT_BigRT_MU';insert into result_val(value, result_id) select '950', r.id from result r where r.name='ISOT_BigRT_MU';insert into result_val(value, result_id) select '630', r.id from result r where r.name='ISOT_BigRT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='950' and r.name='ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='630' and r.name='ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '1800', r.id from result r where r.name='ISOT_BigRT_MU';insert into result_val(value, result_id) select '1500', r.id from result r where r.name='ISOT_BigRT_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='ISOT_BigRT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('CH_COGE_MU_M');insert into result_val(value, result_id) select '91000', r.id from result r where r.name='CH_COGE_MU_M';insert into result_val(value, result_id) select '74000', r.id from result r where r.name='CH_COGE_MU_M';insert into result_val(value, result_id) select '50000', r.id from result r where r.name='CH_COGE_MU_M'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='91000' and r.name='CH_COGE_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='74000' and r.name='CH_COGE_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='50000' and r.name='CH_COGE_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='1')     );insert into result_val(value, result_id) select '110000', r.id from result r where r.name='CH_COGE_MU_M';insert into result_val(value, result_id) select '91000', r.id from result r where r.name='CH_COGE_MU_M';insert into result_val(value, result_id) select '61000', r.id from result r where r.name='CH_COGE_MU_M'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='110000' and r.name='CH_COGE_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='91000' and r.name='CH_COGE_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='61000' and r.name='CH_COGE_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='2')     );insert into result_val(value, result_id) select '110000', r.id from result r where r.name='CH_COGE_MU_M';insert into result_val(value, result_id) select '87000', r.id from result r where r.name='CH_COGE_MU_M';insert into result_val(value, result_id) select '59000', r.id from result r where r.name='CH_COGE_MU_M'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='110000' and r.name='CH_COGE_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='87000' and r.name='CH_COGE_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='59000' and r.name='CH_COGE_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='3')     );insert into result(name) values('CH_COGE_MU_A');insert into result_val(value, result_id) select '48000', r.id from result r where r.name='CH_COGE_MU_A';insert into result_val(value, result_id) select '39000', r.id from result r where r.name='CH_COGE_MU_A';insert into result_val(value, result_id) select '26000', r.id from result r where r.name='CH_COGE_MU_A'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='48000' and r.name='CH_COGE_MU_A' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='39000' and r.name='CH_COGE_MU_A' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26000' and r.name='CH_COGE_MU_A' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='1')     );insert into result_val(value, result_id) select '65000', r.id from result r where r.name='CH_COGE_MU_A';insert into result_val(value, result_id) select '53000', r.id from result r where r.name='CH_COGE_MU_A';insert into result_val(value, result_id) select '36000', r.id from result r where r.name='CH_COGE_MU_A'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='65000' and r.name='CH_COGE_MU_A' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='53000' and r.name='CH_COGE_MU_A' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='36000' and r.name='CH_COGE_MU_A' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='2')     );insert into result_val(value, result_id) select '62000', r.id from result r where r.name='ZONE';insert into result_val(value, result_id) select '51000', r.id from result r where r.name='ZONE';insert into result_val(value, result_id) select '34000', r.id from result r where r.name='ZONE'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='62000' and r.name='CH_COGE_MU_A' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE2' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='51000' and r.name='CH_COGE_MU_A' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE2' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='34000' and r.name='CH_COGE_MU_A' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE2' and iv.value='3')     );
insert into result(name) values('TER_ISOM_MU');insert into result_val(value, result_id) select '3900', r.id from result r where r.name='TER_ISOM_MU';insert into result_val(value, result_id) select '3200', r.id from result r where r.name='TER_ISOM_MU';insert into result_val(value, result_id) select '2100', r.id from result r where r.name='TER_ISOM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '6100', r.id from result r where r.name='TER_ISOM_MU';insert into result_val(value, result_id) select '5000', r.id from result r where r.name='TER_ISOM_MU';insert into result_val(value, result_id) select '3300', r.id from result r where r.name='TER_ISOM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6100' and r.name='TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('TER_ISOC_MU');insert into result_val(value, result_id) select '2400', r.id from result r where r.name='TER_ISOC_MU';insert into result_val(value, result_id) select '2000', r.id from result r where r.name='TER_ISOC_MU';insert into result_val(value, result_id) select '1300', r.id from result r where r.name='TER_ISOC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '3800', r.id from result r where r.name='TER_ISOC_MU';insert into result_val(value, result_id) select '3100', r.id from result r where r.name='TER_ISOC_MU';insert into result_val(value, result_id) select '2100', r.id from result r where r.name='TER_ISOC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3800' and r.name='TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('TER_ISOP_MU');insert into result_val(value, result_id) select '4800', r.id from result r where r.name='TER_ISOP_MU';insert into result_val(value, result_id) select '3900', r.id from result r where r.name='TER_ISOP_MU';insert into result_val(value, result_id) select '2700', r.id from result r where r.name='TER_ISOP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4800' and r.name='TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '7600', r.id from result r where r.name='TER_ISOP_MU';insert into result_val(value, result_id) select '6200', r.id from result r where r.name='TER_ISOP_MU';insert into result_val(value, result_id) select '4300', r.id from result r where r.name='TER_ISOP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7600' and r.name='TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6200' and r.name='TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4300' and r.name='TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('TER_ISOF_MU');insert into result_val(value, result_id) select '4000', r.id from result r where r.name='TER_ISOF_MU';insert into result_val(value, result_id) select '3300', r.id from result r where r.name='TER_ISOF_MU';insert into result_val(value, result_id) select '2200', r.id from result r where r.name='TER_ISOF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '6300', r.id from result r where r.name='TER_ISOF_MU';insert into result_val(value, result_id) select '5100', r.id from result r where r.name='TER_ISOF_MU';insert into result_val(value, result_id) select '3400', r.id from result r where r.name='TER_ISOF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6300' and r.name='TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5100' and r.name='TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('TER_ISOT_MediumRT_MU');insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TER_ISOT_MediumRT_MU';insert into result_val(value, result_id) select '910', r.id from result r where r.name='TER_ISOT_MediumRT_MU';insert into result_val(value, result_id) select '600', r.id from result r where r.name='TER_ISOT_MediumRT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='910' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '1800', r.id from result r where r.name='TER_ISOT_MediumRT_MU';insert into result_val(value, result_id) select '1400', r.id from result r where r.name='TER_ISOT_MediumRT_MU';insert into result_val(value, result_id) select '960', r.id from result r where r.name='TER_ISOT_MediumRT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='960' and r.name='TER_ISOT_MediumRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('TER_ISOT_BigRT_MU');insert into result_val(value, result_id) select '2300', r.id from result r where r.name='TER_ISOT_BigRT_MU';insert into result_val(value, result_id) select '1900', r.id from result r where r.name='TER_ISOT_BigRT_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='TER_ISOT_BigRT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '3600', r.id from result r where r.name='TER_ISOT_BigRT_MU';insert into result_val(value, result_id) select '3000', r.id from result r where r.name='TER_ISOT_BigRT_MU';insert into result_val(value, result_id) select '2000', r.id from result r where r.name='TER_ISOT_BigRT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3000' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='TER_ISOT_BigRT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('TER_CH_BAS_MU1');insert into result_val(value, result_id) select '340', r.id from result r where r.name='TER_CH_BAS_MU1';insert into result_val(value, result_id) select '280', r.id from result r where r.name='TER_CH_BAS_MU1';insert into result_val(value, result_id) select '180', r.id from result r where r.name='TER_CH_BAS_MU1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='340' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='280' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='1')     );insert into result_val(value, result_id) select '410', r.id from result r where r.name='TER_CH_BAS_MU1';insert into result_val(value, result_id) select '330', r.id from result r where r.name='TER_CH_BAS_MU1';insert into result_val(value, result_id) select '220', r.id from result r where r.name='TER_CH_BAS_MU1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='410' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='330' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='220' and r.name='TER_CH_BAS_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='2')     );
insert into result(name) values('TER_CH_BAS_MU2');insert into result_val(value, result_id) select '370', r.id from result r where r.name='TER_CH_BAS_MU2';insert into result_val(value, result_id) select '310', r.id from result r where r.name='TER_CH_BAS_MU2';insert into result_val(value, result_id) select '220', r.id from result r where r.name='TER_CH_BAS_MU2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='370' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='310' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='220' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='1')     );insert into result_val(value, result_id) select '450', r.id from result r where r.name='TER_CH_BAS_MU2';insert into result_val(value, result_id) select '380', r.id from result r where r.name='TER_CH_BAS_MU2';insert into result_val(value, result_id) select '270', r.id from result r where r.name='TER_CH_BAS_MU2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='450' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='380' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='270' and r.name='TER_CH_BAS_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='2')     );insert into result(name) values('TER_CH_COND_MU1');insert into result_val(value, result_id) select '770', r.id from result r where r.name='TER_CH_COND_MU1';insert into result_val(value, result_id) select '630', r.id from result r where r.name='TER_CH_COND_MU1';insert into result_val(value, result_id) select '420', r.id from result r where r.name='TER_CH_COND_MU1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='770' and r.name='TER_CH_COND_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_CH_COND_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='420' and r.name='TER_CH_COND_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='1')     );insert into result_val(value, result_id) select '930', r.id from result r where r.name='TER_CH_COND_MU1';insert into result_val(value, result_id) select '760', r.id from result r where r.name='TER_CH_COND_MU1';insert into result_val(value, result_id) select '510', r.id from result r where r.name='TER_CH_COND_MU1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='930' and r.name='TER_CH_COND_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_CH_COND_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='510' and r.name='TER_CH_COND_MU1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='2')     );insert into result(name) values('TER_CH_COND_MU2');insert into result_val(value, result_id) select '860', r.id from result r where r.name='TER_CH_COND_MU2';insert into result_val(value, result_id) select '720', r.id from result r where r.name='TER_CH_COND_MU2';insert into result_val(value, result_id) select '500', r.id from result r where r.name='TER_CH_COND_MU2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='860' and r.name='TER_CH_COND_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_CH_COND_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='500' and r.name='TER_CH_COND_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='1')     );insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TER_CH_COND_MU2';insert into result_val(value, result_id) select '860', r.id from result r where r.name='TER_CH_COND_MU2';insert into result_val(value, result_id) select '610', r.id from result r where r.name='TER_CH_COND_MU2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_CH_COND_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='POWERCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='860' and r.name='TER_CH_COND_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='POWERCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='610' and r.name='TER_CH_COND_MU2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='POWERCLASS' and iv.value='2')     );insert into result(name) values('TER_PROGEL_MU');insert into result_val(value, result_id) select '200', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '170', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '110', r.id from result r where r.name='TER_PROGEL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='200' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='200' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='170' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into result_val(value, result_id) select '140', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '110', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '80', r.id from result r where r.name='TER_PROGEL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='110' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into result_val(value, result_id) select '150', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '120', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '80', r.id from result r where r.name='TER_PROGEL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='120' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into result_val(value, result_id) select '160', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '130', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '90', r.id from result r where r.name='TER_PROGEL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='130' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into result_val(value, result_id) select '190', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '150', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '100', r.id from result r where r.name='TER_PROGEL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='190' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='190' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into result_val(value, result_id) select '140', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '110', r.id from result r where r.name='TER_PROGEL_MU';insert into result_val(value, result_id) select '80', r.id from result r where r.name='TER_PROGEL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='110' and r.name='TER_PROGEL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );
insert into result(name) values('TER_PROGEL_MUGT');insert into result_val(value, result_id) select '170', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '140', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '90', r.id from result r where r.name='TER_PROGEL_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='170' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='90' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='1')     );insert into result_val(value, result_id) select '120', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '100', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '60', r.id from result r where r.name='TER_PROGEL_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='120' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='100' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='60' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='2')     );insert into result_val(value, result_id) select '120', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '100', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '70', r.id from result r where r.name='TER_PROGEL_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='120' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='100' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='70' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='3')     );insert into result_val(value, result_id) select '110', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '90', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '60', r.id from result r where r.name='TER_PROGEL_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='110' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='90' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='60' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='4')     );insert into result_val(value, result_id) select '180', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '150', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '100', r.id from result r where r.name='TER_PROGEL_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='100' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='5')     );insert into result_val(value, result_id) select '6', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '90', r.id from result r where r.name='TER_PROGEL_MUGT';insert into result_val(value, result_id) select '60', r.id from result r where r.name='TER_PROGEL_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='90' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC' and iv.value='6')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='60' and r.name='TER_PROGEL_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC' and iv.value='6')     );insert into result(name) values('TER_RACC_MU');insert into result_val(value, result_id) select '2200', r.id from result r where r.name='TER_RACC_MU';insert into result_val(value, result_id) select '1700', r.id from result r where r.name='TER_RACC_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TER_RACC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='TER_RACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='TER_RACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_RACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE' and iv.value='1')     );insert into result_val(value, result_id) select '2400', r.id from result r where r.name='TER_RACC_MU';insert into result_val(value, result_id) select '2000', r.id from result r where r.name='TER_RACC_MU';insert into result_val(value, result_id) select '1300', r.id from result r where r.name='TER_RACC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='TER_RACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='TER_RACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='TER_RACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE' and iv.value='2')     );insert into result(name) values('TER_VMC_DF_MU');insert into result_val(value, result_id) select '1200', r.id from result r where r.name='TER_VMC_DF_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TER_VMC_DF_MU';insert into result_val(value, result_id) select '670', r.id from result r where r.name='TER_VMC_DF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='670' and r.name='TER_VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '2000', r.id from result r where r.name='TER_VMC_DF_MU';insert into result_val(value, result_id) select '1600', r.id from result r where r.name='TER_VMC_DF_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TER_VMC_DF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='TER_VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='TER_VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_VMC_DF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('TER_VMC_DF_MUGT');insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TER_VMC_DF_MUGT';insert into result_val(value, result_id) select '900', r.id from result r where r.name='TER_VMC_DF_MUGT';insert into result_val(value, result_id) select '600', r.id from result r where r.name='TER_VMC_DF_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='900' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='600' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '1900', r.id from result r where r.name='TER_VMC_DF_MUGT';insert into result_val(value, result_id) select '1600', r.id from result r where r.name='TER_VMC_DF_MUGT';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TER_VMC_DF_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_VMC_DF_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('TER_VMC_SFA_MU');insert into result_val(value, result_id) select '290', r.id from result r where r.name='TER_VMC_SFA_MU';insert into result_val(value, result_id) select '230', r.id from result r where r.name='TER_VMC_SFA_MU';insert into result_val(value, result_id) select '160', r.id from result r where r.name='TER_VMC_SFA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='290' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='230' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '510', r.id from result r where r.name='TER_VMC_SFA_MU';insert into result_val(value, result_id) select '420', r.id from result r where r.name='TER_VMC_SFA_MU';insert into result_val(value, result_id) select '280', r.id from result r where r.name='TER_VMC_SFA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='510' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='420' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='280' and r.name='TER_VMC_SFA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('TER_VMC_SFA_MUGT');insert into result_val(value, result_id) select '240', r.id from result r where r.name='TER_VMC_SFA_MUGT';insert into result_val(value, result_id) select '190', r.id from result r where r.name='TER_VMC_SFA_MUGT';insert into result_val(value, result_id) select '130', r.id from result r where r.name='TER_VMC_SFA_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='190' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='130' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '350', r.id from result r where r.name='TER_VMC_SFA_MUGT';insert into result_val(value, result_id) select '290', r.id from result r where r.name='TER_VMC_SFA_MUGT';insert into result_val(value, result_id) select '190', r.id from result r where r.name='TER_VMC_SFA_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='350' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='290' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='190' and r.name='TER_VMC_SFA_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );
insert into result(name) values('TER_LED_DOWN_MU');insert into result_val(value, result_id) select '640', r.id from result r where r.name='TER_LED_DOWN_MU';insert into result_val(value, result_id) select '770', r.id from result r where r.name='TER_LED_DOWN_MU';insert into result_val(value, result_id) select '890', r.id from result r where r.name='TER_LED_DOWN_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='640' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='770' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='890' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '1180', r.id from result r where r.name='TER_LED_DOWN_MU';insert into result_val(value, result_id) select '1420', r.id from result r where r.name='TER_LED_DOWN_MU';insert into result_val(value, result_id) select '1660', r.id from result r where r.name='TER_LED_DOWN_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1180' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1420' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1660' and r.name='TER_LED_DOWN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result(name) values('TER_LED_ACC_MU');insert into result_val(value, result_id) select '630', r.id from result r where r.name='TER_LED_ACC_MU';insert into result_val(value, result_id) select '760', r.id from result r where r.name='TER_LED_ACC_MU';insert into result_val(value, result_id) select '880', r.id from result r where r.name='TER_LED_ACC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_LED_ACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_LED_ACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='880' and r.name='TER_LED_ACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '1300', r.id from result r where r.name='TER_LED_ACC_MU';insert into result_val(value, result_id) select '1560', r.id from result r where r.name='TER_LED_ACC_MU';insert into result_val(value, result_id) select '1820', r.id from result r where r.name='TER_LED_ACC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='TER_LED_ACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1560' and r.name='TER_LED_ACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1820' and r.name='TER_LED_ACC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result(name) values('TER_VENTILO_CH_FC');insert into result_val(value, result_id) select '2.3', r.id from result r where r.name='TER_VENTILO_CH_FC';insert into result_val(value, result_id) select '2.35', r.id from result r where r.name='TER_VENTILO_CH_FC';insert into result_val(value, result_id) select '2.35', r.id from result r where r.name='TER_VENTILO_CH_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.3' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.35' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.35' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='1')     );insert into result_val(value, result_id) select '2.2', r.id from result r where r.name='TER_VENTILO_CH_FC';insert into result_val(value, result_id) select '2.2', r.id from result r where r.name='TER_VENTILO_CH_FC';insert into result_val(value, result_id) select '2.2', r.id from result r where r.name='TER_VENTILO_CH_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.2' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.2' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.2' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='2')     );insert into result_val(value, result_id) select '0.65', r.id from result r where r.name='TER_VENTILO_CH_FC';insert into result_val(value, result_id) select '0.6', r.id from result r where r.name='TER_VENTILO_CH_FC';insert into result_val(value, result_id) select '0.65', r.id from result r where r.name='TER_VENTILO_CH_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.65' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.65' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='3')     );insert into result_val(value, result_id) select '0.6', r.id from result r where r.name='TER_VENTILO_CH_FC';insert into result_val(value, result_id) select '0.6', r.id from result r where r.name='TER_VENTILO_CH_FC';insert into result_val(value, result_id) select '0.6', r.id from result r where r.name='TER_VENTILO_CH_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='4')     );insert into result_val(value, result_id) select '0.45', r.id from result r where r.name='TER_VENTILO_CH_FC';insert into result_val(value, result_id) select '0.45', r.id from result r where r.name='TER_VENTILO_CH_FC';insert into result_val(value, result_id) select '0.4', r.id from result r where r.name='TER_VENTILO_CH_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.45' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.45' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.4' and r.name='TER_VENTILO_CH_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='5')     );insert into result(name) values('TER_VENTILO_FR_FC');insert into result_val(value, result_id) select '2.05', r.id from result r where r.name='TER_VENTILO_FR_FC';insert into result_val(value, result_id) select '2.1', r.id from result r where r.name='TER_VENTILO_FR_FC';insert into result_val(value, result_id) select '2.05', r.id from result r where r.name='TER_VENTILO_FR_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.05' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.1' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.05' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='1')     );insert into result_val(value, result_id) select '3.1', r.id from result r where r.name='TER_VENTILO_FR_FC';insert into result_val(value, result_id) select '3.35', r.id from result r where r.name='TER_VENTILO_FR_FC';insert into result_val(value, result_id) select '2.6', r.id from result r where r.name='TER_VENTILO_FR_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3.1' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3.35' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.6' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='2')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_VENTILO_FR_FC';insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_VENTILO_FR_FC';insert into result_val(value, result_id) select '0.8', r.id from result r where r.name='TER_VENTILO_FR_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='3')     );insert into result_val(value, result_id) select '1.85', r.id from result r where r.name='TER_VENTILO_FR_FC';insert into result_val(value, result_id) select '1.55', r.id from result r where r.name='TER_VENTILO_FR_FC';insert into result_val(value, result_id) select '0.95', r.id from result r where r.name='TER_VENTILO_FR_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1.85' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1.55' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='4')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.95' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='4')     );insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_VENTILO_FR_FC';insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_VENTILO_FR_FC';insert into result_val(value, result_id) select '0', r.id from result r where r.name='TER_VENTILO_FR_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='SEC3' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='SEC3' and iv.value='5')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_VENTILO_FR_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='SEC3' and iv.value='5')     );
insert into result(name) values('TER_LUMT5_FC');insert into result_val(value, result_id) select '750', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '900', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '1050', r.id from result r where r.name='TER_LUMT5_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='750' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='900' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1050' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '540', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '650', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '760', r.id from result r where r.name='TER_LUMT5_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='540' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '830', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='TER_LUMT5_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='830' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '540', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '650', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '760', r.id from result r where r.name='TER_LUMT5_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='540' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '1600', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '1950', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '2300', r.id from result r where r.name='TER_LUMT5_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1950' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '540', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '650', r.id from result r where r.name='TER_LUMT5_FC';insert into result_val(value, result_id) select '760', r.id from result r where r.name='TER_LUMT5_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='540' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='760' and r.name='TER_LUMT5_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result(name) values('TER_LUMFLUO_BALLAST_FC');insert into result_val(value, result_id) select '700', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '840', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='700' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='840' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '500', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '610', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '710', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='500' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='610' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='710' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '900', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '1300', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='900' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '840', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='840' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '1500', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '2100', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '500', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '610', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC';insert into result_val(value, result_id) select '710', r.id from result r where r.name='TER_LUMFLUO_BALLAST_FC'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='500' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='610' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='710' and r.name='TER_LUMFLUO_BALLAST_FC' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result(name) values('TER_VMMP_MU');insert into result_val(value, result_id) select '2300', r.id from result r where r.name='TER_VMMP_MU';insert into result_val(value, result_id) select '2000', r.id from result r where r.name='TER_VMMP_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='TER_VMMP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='TER_VMMP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='TER_VMMP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_VMMP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '3100', r.id from result r where r.name='TER_VMMP_MU';insert into result_val(value, result_id) select '2500', r.id from result r where r.name='TER_VMMP_MU';insert into result_val(value, result_id) select '1700', r.id from result r where r.name='TER_VMMP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='TER_VMMP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='TER_VMMP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='TER_VMMP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('TER_VMMP_MUGT');insert into result_val(value, result_id) select '2100', r.id from result r where r.name='TER_VMMP_MUGT';insert into result_val(value, result_id) select '1700', r.id from result r where r.name='TER_VMMP_MUGT';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='TER_VMMP_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='TER_VMMP_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='TER_VMMP_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TER_VMMP_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '2800', r.id from result r where r.name='TER_VMMP_MUGT';insert into result_val(value, result_id) select '2300', r.id from result r where r.name='TER_VMMP_MUGT';insert into result_val(value, result_id) select '1500', r.id from result r where r.name='TER_VMMP_MUGT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='TER_VMMP_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='TER_VMMP_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='TER_VMMP_MUGT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );
insert into result(name) values('IND_FC_STRAT');insert into result_val(value, result_id) select '1', r.id from result r where r.name='IND_FC_STRAT';insert into result_val(value, result_id) select '1.1', r.id from result r where r.name='IND_FC_STRAT';insert into result_val(value, result_id) select '1.4', r.id from result r where r.name='IND_FC_STRAT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='IND_FC_STRAT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='HLOCCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='IND_FC_STRAT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='HLOCCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1.4' and r.name='IND_FC_STRAT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='HLOCCLASS' and iv.value='1')     );insert into result_val(value, result_id) select '2.7', r.id from result r where r.name='IND_FC_STRAT';insert into result_val(value, result_id) select '3.1', r.id from result r where r.name='IND_FC_STRAT';insert into result_val(value, result_id) select '3.7', r.id from result r where r.name='IND_FC_STRAT'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2.7' and r.name='IND_FC_STRAT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='HLOCCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3.1' and r.name='IND_FC_STRAT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='HLOCCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3.7' and r.name='IND_FC_STRAT' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='HLOCCLASS' and iv.value='2')     );insert into result(name) values('IND_MU_LIGHTSOD');insert into result_val(value, result_id) select '1700', r.id from result r where r.name='IND_MU_LIGHTSOD';insert into result_val(value, result_id) select '3300', r.id from result r where r.name='IND_MU_LIGHTSOD';insert into result_val(value, result_id) select '5300', r.id from result r where r.name='IND_MU_LIGHTSOD'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5300' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '3200', r.id from result r where r.name='IND_MU_LIGHTSOD';insert into result_val(value, result_id) select '6200', r.id from result r where r.name='IND_MU_LIGHTSOD';insert into result_val(value, result_id) select '9800', r.id from result r where r.name='IND_MU_LIGHTSOD'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6200' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9800' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '3900', r.id from result r where r.name='IND_MU_LIGHTSOD';insert into result_val(value, result_id) select '7600', r.id from result r where r.name='IND_MU_LIGHTSOD';insert into result_val(value, result_id) select '12000', r.id from result r where r.name='IND_MU_LIGHTSOD'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7600' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12000' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result_val(value, result_id) select '5300', r.id from result r where r.name='IND_MU_LIGHTSOD';insert into result_val(value, result_id) select '10000', r.id from result r where r.name='IND_MU_LIGHTSOD';insert into result_val(value, result_id) select '17000', r.id from result r where r.name='IND_MU_LIGHTSOD'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5300' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10000' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17000' and r.name='IND_MU_LIGHTSOD' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join 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 result(name) values('P3_FEN_MU');insert into result_val(value, result_id) select '5200', r.id from result r where r.name='P3_FEN_MU';insert into result_val(value, result_id) select '4200', r.id from result r where r.name='P3_FEN_MU';insert into result_val(value, result_id) select '2800', r.id from result r where r.name='P3_FEN_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5200' and r.name='P3_FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4200' and r.name='P3_FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='P3_FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '8200', r.id from result r where r.name='P3_FEN_MU';insert into result_val(value, result_id) select '6700', r.id from result r where r.name='P3_FEN_MU';insert into result_val(value, result_id) select '4500', r.id from result r where r.name='P3_FEN_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8200' and r.name='P3_FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6700' and r.name='P3_FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4500' and r.name='P3_FEN_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_PROG_MU_M');insert into result_val(value, result_id) select '11600', r.id from result r where r.name='P3_PROG_MU_M';insert into result_val(value, result_id) select '9500', r.id from result r where r.name='P3_PROG_MU_M';insert into result_val(value, result_id) select '6300', r.id from result r where r.name='P3_PROG_MU_M'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11600' and r.name='P3_PROG_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9500' and r.name='P3_PROG_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6300' and r.name='P3_PROG_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '14200', r.id from result r where r.name='P3_PROG_MU_M';insert into result_val(value, result_id) select '11600', r.id from result r where r.name='P3_PROG_MU_M';insert into result_val(value, result_id) select '7700', r.id from result r where r.name='P3_PROG_MU_M'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14200' and r.name='P3_PROG_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11600' and r.name='P3_PROG_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7700' and r.name='P3_PROG_MU_M' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_PROG_MU_A_I');insert into result_val(value, result_id) select '4300', r.id from result r where r.name='P3_PROG_MU_A_I';insert into result_val(value, result_id) select '3500', r.id from result r where r.name='P3_PROG_MU_A_I';insert into result_val(value, result_id) select '2300', r.id from result r where r.name='P3_PROG_MU_A_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4300' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3500' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '6600', r.id from result r where r.name='P3_PROG_MU_A_I';insert into result_val(value, result_id) select '5400', r.id from result r where r.name='P3_PROG_MU_A_I';insert into result_val(value, result_id) select '3600', r.id from result r where r.name='P3_PROG_MU_A_I'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6600' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5400' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_PROG_MU_A_I' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_ISOC_MU');insert into result_val(value, result_id) select '1500', r.id from result r where r.name='P3_ISOC_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_ISOC_MU';insert into result_val(value, result_id) select '800', r.id from result r where r.name='P3_ISOC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='P3_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='800' and r.name='P3_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '2300', r.id from result r where r.name='P3_ISOC_MU';insert into result_val(value, result_id) select '1900', r.id from result r where r.name='P3_ISOC_MU';insert into result_val(value, result_id) select '1300', r.id from result r where r.name='P3_ISOC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='P3_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_ISOM_MU');insert into result_val(value, result_id) select '2400', r.id from result r where r.name='P3_ISOM_MU';insert into result_val(value, result_id) select '2000', r.id from result r where r.name='P3_ISOM_MU';insert into result_val(value, result_id) select '1300', r.id from result r where r.name='P3_ISOM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='P3_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '3800', r.id from result r where r.name='P3_ISOM_MU';insert into result_val(value, result_id) select '3100', r.id from result r where r.name='P3_ISOM_MU';insert into result_val(value, result_id) select '2100', r.id from result r where r.name='P3_ISOM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3800' and r.name='P3_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3100' and r.name='P3_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='P3_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_ISOP_MU');insert into result_val(value, result_id) select '2900', r.id from result r where r.name='P3_ISOP_MU';insert into result_val(value, result_id) select '2400', r.id from result r where r.name='P3_ISOP_MU';insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_ISOP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='P3_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='P3_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '4600', r.id from result r where r.name='P3_ISOP_MU';insert into result_val(value, result_id) select '3800', r.id from result r where r.name='P3_ISOP_MU';insert into result_val(value, result_id) select '2500', r.id from result r where r.name='P3_ISOP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4600' and r.name='P3_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3800' and r.name='P3_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='P3_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );
insert into result(name) values('P3_ISOT_MU');insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_ISOT_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_ISOT_MU';insert into result_val(value, result_id) select '800', r.id from result r where r.name='P3_ISOT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='800' and r.name='P3_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '2200', r.id from result r where r.name='P3_ISOT_MU';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='P3_ISOT_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_ISOT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='P3_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_CHAUD_MU');insert into result_val(value, result_id) select '76300', r.id from result r where r.name='P3_CHAUD_MU';insert into result_val(value, result_id) select '64500', r.id from result r where r.name='P3_CHAUD_MU';insert into result_val(value, result_id) select '46500', r.id from result r where r.name='P3_CHAUD_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='76300' and r.name='P3_CHAUD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='LOG' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='64500' and r.name='P3_CHAUD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='LOG' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='46500' and r.name='P3_CHAUD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='LOG' and iv.value='1')     );insert into result_val(value, result_id) select '40300', r.id from result r where r.name='P3_CHAUD_MU';insert into result_val(value, result_id) select '34400', r.id from result r where r.name='P3_CHAUD_MU';insert into result_val(value, result_id) select '25800', r.id from result r where r.name='P3_CHAUD_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='40300' and r.name='P3_CHAUD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='LOG' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='34400' and r.name='P3_CHAUD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='LOG' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='25800' and r.name='P3_CHAUD_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='LOG' and iv.value='2')     );insert into result(name) values('P3_CHAUD_MU_2');insert into result_val(value, result_id) select '46900', r.id from result r where r.name='P3_CHAUD_MU_2';insert into result_val(value, result_id) select '39600', r.id from result r where r.name='P3_CHAUD_MU_2';insert into result_val(value, result_id) select '28500', r.id from result r where r.name='P3_CHAUD_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='46900' and r.name='P3_CHAUD_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='LOG' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='39600' and r.name='P3_CHAUD_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='LOG' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='28500' and r.name='P3_CHAUD_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='LOG' and iv.value='1')     );insert into result_val(value, result_id) select '24800', r.id from result r where r.name='P3_CHAUD_MU_2';insert into result_val(value, result_id) select '21200', r.id from result r where r.name='P3_CHAUD_MU_2';insert into result_val(value, result_id) select '15800', r.id from result r where r.name='P3_CHAUD_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='24800' and r.name='P3_CHAUD_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='LOG' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='21200' and r.name='P3_CHAUD_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='LOG' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15800' and r.name='P3_CHAUD_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='LOG' and iv.value='2')     );insert into result(name) values('P3_CHAUD_COL_MU');insert into result_val(value, result_id) select '47500', r.id from result r where r.name='P3_CHAUD_COL_MU';insert into result_val(value, result_id) select '40900', r.id from result r where r.name='P3_CHAUD_COL_MU';insert into result_val(value, result_id) select '30500', r.id from result r where r.name='P3_CHAUD_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='47500' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_POWERCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='40900' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_POWERCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='30500' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_POWERCLASS' and iv.value='1')     );insert into result_val(value, result_id) select '50100', r.id from result r where r.name='P3_CHAUD_COL_MU';insert into result_val(value, result_id) select '43200', r.id from result r where r.name='P3_CHAUD_COL_MU';insert into result_val(value, result_id) select '32100', r.id from result r where r.name='P3_CHAUD_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='50100' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_POWERCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43200' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_POWERCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32100' and r.name='P3_CHAUD_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_POWERCLASS' and iv.value='2')     );insert into result(name) values('P3_FERM_MU');insert into result_val(value, result_id) select '800', r.id from result r where r.name='P3_FERM_MU';insert into result_val(value, result_id) select '660', r.id from result r where r.name='P3_FERM_MU';insert into result_val(value, result_id) select '440', r.id from result r where r.name='P3_FERM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='800' and r.name='P3_FERM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='660' and r.name='P3_FERM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='440' and r.name='P3_FERM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '1300', r.id from result r where r.name='P3_FERM_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_FERM_MU';insert into result_val(value, result_id) select '690', r.id from result r where r.name='P3_FERM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_FERM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_FERM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='690' and r.name='P3_FERM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_LED_PCOM_MU');insert into result_val(value, result_id) select '1500', r.id from result r where r.name='P3_LED_PCOM_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_LED_PCOM_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='P3_LED_PCOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_IK' and iv.value='0')    or (i.name='P3_LUMGEST' and iv.value='0')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_LED_PCOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_IK' and iv.value='1')    or (i.name='P3_LUMGEST' and iv.value='0')     ); insert into result_val(value, result_id) select '1900', r.id from result r where r.name='P3_LED_PCOM_MU';insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_LED_PCOM_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='P3_LED_PCOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_IK' and iv.value='0')    or (i.name='P3_LUMGEST' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_LED_PCOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_IK' and iv.value='1')    or (i.name='P3_LUMGEST' and iv.value='1')     ); insert into result(name) values('P3_EMET_MU');insert into result_val(value, result_id) select '3200', r.id from result r where r.name='P3_EMET_MU';insert into result_val(value, result_id) select '2600', r.id from result r where r.name='P3_EMET_MU';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='P3_EMET_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='P3_EMET_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='LOG' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='P3_EMET_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='LOG' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_EMET_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='LOG' and iv.value='1')     );insert into result_val(value, result_id) select '2200', r.id from result r where r.name='P3_EMET_MU';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='P3_EMET_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_EMET_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='P3_EMET_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='LOG' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_EMET_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='LOG' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_EMET_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='LOG' and iv.value='2')     );insert into result_val(value, result_id) select '2200', r.id from result r where r.name='P3_EMET_MU';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='P3_EMET_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_EMET_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='P3_EMET_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='LOG' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_EMET_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='LOG' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_EMET_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='LOG' and iv.value='3')     ); insert into result(name) values('P3_NAPP_ENR_MU');   insert into result_val(value, result_id) select '15100', r.id from result r where r.name='P3_NAPP_ENR_MU';insert into result_val(value, result_id) select '12400', r.id from result r where r.name='P3_NAPP_ENR_MU';insert into result_val(value, result_id) select '8300', r.id from result r where r.name='P3_NAPP_ENR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15100' and r.name='P3_NAPP_ENR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12400' and r.name='P3_NAPP_ENR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8300' and r.name='P3_NAPP_ENR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '26500', r.id from result r where r.name='P3_NAPP_ENR_MU';insert into result_val(value, result_id) select '21700', r.id from result r where r.name='P3_NAPP_ENR_MU';insert into result_val(value, result_id) select '14400', r.id from result r where r.name='P3_NAPP_ENR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26500' and r.name='P3_NAPP_ENR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='21700' and r.name='P3_NAPP_ENR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14400' and r.name='P3_NAPP_ENR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );  insert into result(name) values('P3_NAPP_ENR_MU_1');   insert into result_val(value, result_id) select '16900', r.id from result r where r.name='P3_NAPP_ENR_MU_1';insert into result_val(value, result_id) select '13800', r.id from result r where r.name='P3_NAPP_ENR_MU_1';insert into result_val(value, result_id) select '9200', r.id from result r where r.name='P3_NAPP_ENR_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='16900' and r.name='P3_NAPP_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13800' and r.name='P3_NAPP_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9200' and r.name='P3_NAPP_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '29300', r.id from result r where r.name='P3_NAPP_ENR_MU_1';insert into result_val(value, result_id) select '23900', r.id from result r where r.name='P3_NAPP_ENR_MU_1';insert into result_val(value, result_id) select '16000', r.id from result r where r.name='P3_NAPP_ENR_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='29300' and r.name='P3_NAPP_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='23900' and r.name='P3_NAPP_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='16000' and r.name='P3_NAPP_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     ); 
 insert into result(name) values('P3_NAPP_ENR_MU_2');   insert into result_val(value, result_id) select '28500', r.id from result r where r.name='P3_NAPP_ENR_MU_2';insert into result_val(value, result_id) select '23300', r.id from result r where r.name='P3_NAPP_ENR_MU_2';insert into result_val(value, result_id) select '15500', r.id from result r where r.name='P3_NAPP_ENR_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='28500' and r.name='P3_NAPP_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='23300' and r.name='P3_NAPP_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15500' and r.name='P3_NAPP_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '46100', r.id from result r where r.name='P3_NAPP_ENR_MU_2';insert into result_val(value, result_id) select '37700', r.id from result r where r.name='P3_NAPP_ENR_MU_2';insert into result_val(value, result_id) select '25100', r.id from result r where r.name='P3_NAPP_ENR_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='46100' and r.name='P3_NAPP_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='37700' and r.name='P3_NAPP_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='25100' and r.name='P3_NAPP_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );  insert into result(name) values('P3_NAPP_ENR_MU_3');  insert into result_val(value, result_id) select '32600', r.id from result r where r.name='P3_NAPP_ENR_MU_3';insert into result_val(value, result_id) select '26700', r.id from result r where r.name='P3_NAPP_ENR_MU_3';insert into result_val(value, result_id) select '17800', r.id from result r where r.name='P3_NAPP_ENR_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32600' and r.name='P3_NAPP_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26700' and r.name='P3_NAPP_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17800' and r.name='P3_NAPP_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '52200', r.id from result r where r.name='P3_NAPP_ENR_MU_3';insert into result_val(value, result_id) select '42700', r.id from result r where r.name='P3_NAPP_ENR_MU_3';insert into result_val(value, result_id) select '28500', r.id from result r where r.name='P3_NAPP_ENR_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='52200' and r.name='P3_NAPP_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='42700' and r.name='P3_NAPP_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='28500' and r.name='P3_NAPP_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );  insert into result(name) values('P3_VMC_ENR_MU_1'); insert into result_val(value, result_id) select '18000', r.id from result r where r.name='P3_VMC_ENR_MU_1';insert into result_val(value, result_id) select '14700', r.id from result r where r.name='P3_VMC_ENR_MU_1';insert into result_val(value, result_id) select '9800', r.id from result r where r.name='P3_VMC_ENR_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18000' and r.name='P3_VMC_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14700' and r.name='P3_VMC_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='9800' and r.name='P3_VMC_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '27500', r.id from result r where r.name='P3_VMC_ENR_MU_1';insert into result_val(value, result_id) select '22500', r.id from result r where r.name='P3_VMC_ENR_MU_1';insert into result_val(value, result_id) select '15000', r.id from result r where r.name='P3_VMC_ENR_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='27500' and r.name='P3_VMC_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='22500' and r.name='P3_VMC_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15000' and r.name='P3_VMC_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_VMC_ENR_MU_2');insert into result_val(value, result_id) select '27400', r.id from result r where r.name='P3_VMC_ENR_MU_2';insert into result_val(value, result_id) select '22400', r.id from result r where r.name='P3_VMC_ENR_MU_2';insert into result_val(value, result_id) select '14900', r.id from result r where r.name='P3_VMC_ENR_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='27400' and r.name='P3_VMC_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='22400' and r.name='P3_VMC_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14900' and r.name='P3_VMC_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '42900', r.id from result r where r.name='P3_VMC_ENR_MU_2';insert into result_val(value, result_id) select '35100', r.id from result r where r.name='P3_VMC_ENR_MU_2';insert into result_val(value, result_id) select '23400', r.id from result r where r.name='P3_VMC_ENR_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='42900' and r.name='P3_VMC_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='35100' and r.name='P3_VMC_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='23400' and r.name='P3_VMC_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     ); insert into result(name) values('P3_VMC_ZONE_ENR_MU_1');   insert into result_val(value, result_id) select '23700', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_1';insert into result_val(value, result_id) select '19400', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_1';insert into result_val(value, result_id) select '12900', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='23700' and r.name='P3_VMC_ZONE_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19400' and r.name='P3_VMC_ZONE_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12900' and r.name='P3_VMC_ZONE_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result_val(value, result_id) select '14800', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_1';insert into result_val(value, result_id) select '12100', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_1';insert into result_val(value, result_id) select '8100', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14800' and r.name='P3_VMC_ZONE_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12100' and r.name='P3_VMC_ZONE_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='8100' and r.name='P3_VMC_ZONE_ENR_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     ); insert into result(name) values('P3_VMC_ZONE_ENR_MU_2');   insert into result_val(value, result_id) select '22800', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_2';insert into result_val(value, result_id) select '18700', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_2';insert into result_val(value, result_id) select '12400', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='22800' and r.name='P3_VMC_ZONE_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18700' and r.name='P3_VMC_ZONE_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12400' and r.name='P3_VMC_ZONE_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result_val(value, result_id) select '13900', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_2';insert into result_val(value, result_id) select '11400', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_2';insert into result_val(value, result_id) select '7600', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13900' and r.name='P3_VMC_ZONE_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11400' and r.name='P3_VMC_ZONE_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7600' and r.name='P3_VMC_ZONE_ENR_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     ); insert into result(name) values('P3_VMC_ZONE_ENR_MU_3');   insert into result_val(value, result_id) select '23300', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_3';insert into result_val(value, result_id) select '19100', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_3';insert into result_val(value, result_id) select '12700', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='23300' and r.name='P3_VMC_ZONE_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19100' and r.name='P3_VMC_ZONE_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12700' and r.name='P3_VMC_ZONE_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result_val(value, result_id) select '14500', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_3';insert into result_val(value, result_id) select '11900', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_3';insert into result_val(value, result_id) select '7900', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14500' and r.name='P3_VMC_ZONE_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11900' and r.name='P3_VMC_ZONE_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7900' and r.name='P3_VMC_ZONE_ENR_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     ); insert into result(name) values('P3_VMC_ZONE_ENR_MU_4');   insert into result_val(value, result_id) select '22400', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_4';insert into result_val(value, result_id) select '18300', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_4';insert into result_val(value, result_id) select '12200', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_4'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='22400' and r.name='P3_VMC_ZONE_ENR_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18300' and r.name='P3_VMC_ZONE_ENR_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12200' and r.name='P3_VMC_ZONE_ENR_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );
insert into result_val(value, result_id) select '13600', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_4';insert into result_val(value, result_id) select '11200', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_4';insert into result_val(value, result_id) select '7400', r.id from result r where r.name='P3_VMC_ZONE_ENR_MU_4'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13600' and r.name='P3_VMC_ZONE_ENR_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11200' and r.name='P3_VMC_ZONE_ENR_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7400' and r.name='P3_VMC_ZONE_ENR_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result(name) values('P3_FC_RSTE_MU');insert into result_val(value, result_id) select '2200', r.id from result r where r.name='P3_FC_RSTE_MU';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='P3_FC_RSTE_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_FC_RSTE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='P3_FC_RSTE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_FC_RSTE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_FC_RSTE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '3300', r.id from result r where r.name='P3_FC_RSTE_MU';insert into result_val(value, result_id) select '2700', r.id from result r where r.name='P3_FC_RSTE_MU';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='P3_FC_RSTE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='P3_FC_RSTE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='P3_FC_RSTE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_FC_RSTE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_RES_LOG_MU');insert into result_val(value, result_id) select '320', r.id from result r where r.name='P3_RES_LOG_MU';insert into result_val(value, result_id) select '210', r.id from result r where r.name='P3_RES_LOG_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='320' and r.name='P3_RES_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_LOG' and iv.value='1')    or (i.name='LOG' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='210' and r.name='P3_RES_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_LOG' and iv.value='2')    or (i.name='LOG' and iv.value='1')     );insert into result_val(value, result_id) select '380', r.id from result r where r.name='P3_RES_LOG_MU';insert into result_val(value, result_id) select '250', r.id from result r where r.name='P3_RES_LOG_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='380' and r.name='P3_RES_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_LOG' and iv.value='1')    or (i.name='LOG' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='250' and r.name='P3_RES_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_LOG' and iv.value='2')    or (i.name='LOG' and iv.value='2')     );insert into result_val(value, result_id) select '380', r.id from result r where r.name='P3_RES_LOG_MU';insert into result_val(value, result_id) select '250', r.id from result r where r.name='P3_RES_LOG_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='380' and r.name='P3_RES_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_LOG' and iv.value='1')    or (i.name='LOG' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='250' and r.name='P3_RES_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_LOG' and iv.value='2')    or (i.name='LOG' and iv.value='3')     );insert into result(name) values('P3_TER_ISOC_MU');insert into result_val(value, result_id) select '2100', r.id from result r where r.name='P3_TER_ISOC_MU';insert into result_val(value, result_id) select '1700', r.id from result r where r.name='P3_TER_ISOC_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='P3_TER_ISOC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '3300', r.id from result r where r.name='P3_TER_ISOC_MU';insert into result_val(value, result_id) select '2700', r.id from result r where r.name='P3_TER_ISOC_MU';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='P3_TER_ISOC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3300' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_TER_ISOC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('P3_TER_ISOM_MU');insert into result_val(value, result_id) select '3400', r.id from result r where r.name='P3_TER_ISOM_MU';insert into result_val(value, result_id) select '2800', r.id from result r where r.name='P3_TER_ISOM_MU';insert into result_val(value, result_id) select '1900', r.id from result r where r.name='P3_TER_ISOM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2800' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1900' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '5400', r.id from result r where r.name='P3_TER_ISOM_MU';insert into result_val(value, result_id) select '4400', r.id from result r where r.name='P3_TER_ISOM_MU';insert into result_val(value, result_id) select '3000', r.id from result r where r.name='P3_TER_ISOM_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5400' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4400' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3000' and r.name='P3_TER_ISOM_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('P3_TER_ISOP_MU');insert into result_val(value, result_id) select '4200', r.id from result r where r.name='P3_TER_ISOP_MU';insert into result_val(value, result_id) select '3400', r.id from result r where r.name='P3_TER_ISOP_MU';insert into result_val(value, result_id) select '2300', r.id from result r where r.name='P3_TER_ISOP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4200' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '6600', r.id from result r where r.name='P3_TER_ISOP_MU';insert into result_val(value, result_id) select '5400', r.id from result r where r.name='P3_TER_ISOP_MU';insert into result_val(value, result_id) select '3600', r.id from result r where r.name='P3_TER_ISOP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6600' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5400' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_TER_ISOP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('P3_TER_ISOT_MU');insert into result_val(value, result_id) select '2000', r.id from result r where r.name='P3_TER_ISOT_MU';insert into result_val(value, result_id) select '1700', r.id from result r where r.name='P3_TER_ISOT_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='P3_TER_ISOT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '3200', r.id from result r where r.name='P3_TER_ISOT_MU';insert into result_val(value, result_id) select '2600', r.id from result r where r.name='P3_TER_ISOT_MU';insert into result_val(value, result_id) select '1700', r.id from result r where r.name='P3_TER_ISOT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_TER_ISOT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('P3_TER_ISOF_MU');
insert into result_val(value, result_id) select '4000', r.id from result r where r.name='P3_TER_ISOF_MU';insert into result_val(value, result_id) select '3200', r.id from result r where r.name='P3_TER_ISOF_MU';insert into result_val(value, result_id) select '2200', r.id from result r where r.name='P3_TER_ISOF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='1')     );insert into result_val(value, result_id) select '6300', r.id from result r where r.name='P3_TER_ISOF_MU';insert into result_val(value, result_id) select '5100', r.id from result r where r.name='P3_TER_ISOF_MU';insert into result_val(value, result_id) select '3400', r.id from result r where r.name='P3_TER_ISOF_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6300' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5100' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENER' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3400' and r.name='P3_TER_ISOF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENER' and iv.value='2')     );insert into result(name) values('P3_TER_PAC_MU_1');insert into result_val(value, result_id) select '420', r.id from result r where r.name='P3_TER_PAC_MU_1';insert into result_val(value, result_id) select '350', r.id from result r where r.name='P3_TER_PAC_MU_1';insert into result_val(value, result_id) select '230', r.id from result r where r.name='P3_TER_PAC_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='420' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_COPECLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='350' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_COPECLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='230' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_COPECLASS' and iv.value='1')     );insert into result_val(value, result_id) select '560', r.id from result r where r.name='P3_TER_PAC_MU_1';insert into result_val(value, result_id) select '460', r.id from result r where r.name='P3_TER_PAC_MU_1';insert into result_val(value, result_id) select '310', r.id from result r where r.name='P3_TER_PAC_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='560' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_COPECLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='460' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_COPECLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='310' and r.name='P3_TER_PAC_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_COPECLASS' and iv.value='2')     );insert into result(name) values('P3_TER_PAC_MU_2');insert into result_val(value, result_id) select '310', r.id from result r where r.name='P3_TER_PAC_MU_2';insert into result_val(value, result_id) select '250', r.id from result r where r.name='P3_TER_PAC_MU_2';insert into result_val(value, result_id) select '170', r.id from result r where r.name='P3_TER_PAC_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='310' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_ETASCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='250' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_ETASCLASS' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='170' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_ETASCLASS' and iv.value='1')     );insert into result_val(value, result_id) select '410', r.id from result r where r.name='P3_TER_PAC_MU_2';insert into result_val(value, result_id) select '330', r.id from result r where r.name='P3_TER_PAC_MU_2';insert into result_val(value, result_id) select '220', r.id from result r where r.name='P3_TER_PAC_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='410' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_ETASCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='330' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_ETASCLASS' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='220' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_ETASCLASS' and iv.value='2')     );insert into result_val(value, result_id) select '500', r.id from result r where r.name='P3_TER_PAC_MU_2';insert into result_val(value, result_id) select '410', r.id from result r where r.name='P3_TER_PAC_MU_2';insert into result_val(value, result_id) select '270', r.id from result r where r.name='P3_TER_PAC_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='500' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='P3_ETASCLASS' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='410' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='P3_ETASCLASS' and iv.value='3')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='270' and r.name='P3_TER_PAC_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='P3_ETASCLASS' and iv.value='3')     );insert into result(name) values('P3_TER_PAC_COL_MU');insert into result_val(value, result_id) select '820', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '670', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '450', r.id from result r where r.name='P3_TER_PAC_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='820' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='CUSAGE' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='670' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='CUSAGE' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='450' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='CUSAGE' and iv.value='1')     );insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '820', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '550', r.id from result r where r.name='P3_TER_PAC_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_PAC_COL_MU' and iv.value='1')    or (i.name='ZONE' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='820' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_PAC_COL_MU' and iv.value='2')    or (i.name='ZONE' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='550' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_TER_PAC_COL_MU' and iv.value='3')    or (i.name='ZONE' and iv.value='2')     );insert into result(name) values('P3_TER_TUBE_LED_MU');insert into result_val(value, result_id) select '670', r.id from result r where r.name='P3_TER_TUBE_LED_MU';insert into result_val(value, result_id) select '830', r.id from result r where r.name='P3_TER_TUBE_LED_MU';insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_TER_TUBE_LED_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='670' and r.name='P3_TER_TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_IND_LONG_TUBE' and iv.value='1')    or (i.name='P3_BALAST' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='830' and r.name='P3_TER_TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_IND_LONG_TUBE' and iv.value='2')    or (i.name='P3_BALAST' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_TER_TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_IND_LONG_TUBE' and iv.value='3')    or (i.name='P3_BALAST' and iv.value='1')     );insert into result_val(value, result_id) select '590', r.id from result r where r.name='P3_TER_TUBE_LED_MU';insert into result_val(value, result_id) select '680', r.id from result r where r.name='P3_TER_TUBE_LED_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='P3_TER_TUBE_LED_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='590' and r.name='P3_TER_TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_IND_LONG_TUBE' and iv.value='1')    or (i.name='P3_BALAST' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='680' and r.name='P3_TER_TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_IND_LONG_TUBE' and iv.value='2')    or (i.name='P3_BALAST' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_TER_TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='P3_IND_LONG_TUBE' and iv.value='3')    or (i.name='P3_BALAST' and iv.value='2')     );insert into result(name) values('P3_TER_VEN_MU_1');insert into result_val(value, result_id) select '580', r.id from result r where r.name='P3_TER_VEN_MU_1';insert into result_val(value, result_id) select '480', r.id from result r where r.name='P3_TER_VEN_MU_1';insert into result_val(value, result_id) select '320', r.id from result r where r.name='P3_TER_VEN_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='580' and r.name='P3_TER_VEN_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='480' and r.name='P3_TER_VEN_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='320' and r.name='P3_TER_VEN_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '950', r.id from result r where r.name='P3_TER_VEN_MU_1';insert into result_val(value, result_id) select '780', r.id from result r where r.name='P3_TER_VEN_MU_1';insert into result_val(value, result_id) select '520', r.id from result r where r.name='P3_TER_VEN_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='950' and r.name='P3_TER_VEN_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='780' and r.name='P3_TER_VEN_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='520' and r.name='P3_TER_VEN_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_TER_VEN_MU_2');insert into result_val(value, result_id) select '470', r.id from result r where r.name='P3_TER_VEN_MU_2';insert into result_val(value, result_id) select '380', r.id from result r where r.name='P3_TER_VEN_MU_2';insert into result_val(value, result_id) select '250', r.id from result r where r.name='P3_TER_VEN_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='470' and r.name='P3_TER_VEN_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='380' and r.name='P3_TER_VEN_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='250' and r.name='P3_TER_VEN_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '770', r.id from result r where r.name='P3_TER_VEN_MU_2';insert into result_val(value, result_id) select '630', r.id from result r where r.name='P3_TER_VEN_MU_2';insert into result_val(value, result_id) select '420', r.id from result r where r.name='P3_TER_VEN_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='770' and r.name='P3_TER_VEN_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='630' and r.name='P3_TER_VEN_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='420' and r.name='P3_TER_VEN_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_TER_VEN_MU_3');insert into result_val(value, result_id) select '240', r.id from result r where r.name='P3_TER_VEN_MU_3';insert into result_val(value, result_id) select '200', r.id from result r where r.name='P3_TER_VEN_MU_3';insert into result_val(value, result_id) select '130', r.id from result r where r.name='P3_TER_VEN_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='P3_TER_VEN_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='200' and r.name='P3_TER_VEN_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='130' and r.name='P3_TER_VEN_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '440', r.id from result r where r.name='P3_TER_VEN_MU_3';insert into result_val(value, result_id) select '360', r.id from result r where r.name='P3_TER_VEN_MU_3';insert into result_val(value, result_id) select '240', r.id from result r where r.name='P3_TER_VEN_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='440' and r.name='P3_TER_VEN_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='360' and r.name='P3_TER_VEN_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='P3_TER_VEN_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );insert into result(name) values('P3_TER_VEN_MU_4');insert into result_val(value, result_id) select '700', r.id from result r where r.name='P3_TER_VEN_MU_4';insert into result_val(value, result_id) select '580', r.id from result r where r.name='P3_TER_VEN_MU_4';insert into result_val(value, result_id) select '380', r.id from result r where r.name='P3_TER_VEN_MU_4'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='700' and r.name='P3_TER_VEN_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='580' and r.name='P3_TER_VEN_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='1')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='380' and r.name='P3_TER_VEN_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='1')     );insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_TER_VEN_MU_4';insert into result_val(value, result_id) select '970', r.id from result r where r.name='P3_TER_VEN_MU_4';insert into result_val(value, result_id) select '640', r.id from result r where r.name='P3_TER_VEN_MU_4'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_TER_VEN_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='1')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='970' and r.name='P3_TER_VEN_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='2')    or (i.name='ENR' and iv.value='2')     );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='640' and r.name='P3_TER_VEN_MU_4' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (       (i.name='ZONE' and iv.value='3')    or (i.name='ENR' and iv.value='2')     );
