select * from policy p where p.product_code ='PL00035' and p.app_flag=1 and exists (select 1 from policy_risk where policy_no = p.policy_no GROUP BY policy_no HAVING count(id)>1 ) and p.pay_method!=0 ;