SELECT a.sub_unit_type, a.series, b.div_num_id, b.div_num_id as div_num_id_, b.pty1_num_id, b.pty1_num_id as pty1_num_id_, b.pty2_num_id as pty2_num_id_, b.pty3_num_id as pty3_num_id_, b.item_num_id as item_num_id_, b.price_add_ratio, b.price_add_amount, b.last_updtme, b.last_update_user_id FROM mdms_bl_distribution_price_add_rule_hdr a LEFT JOIN mdms_bl_distribution_price_add_rule_dtl b ON a.rule_num_id = b.rule_num_id AND a.tenant_num_id = b.tenant_num_id AND a.data_sign = b.data_sign WHERE a.tenant_num_id = ? AND a.data_sign = ? [and sub_unit_type=?] [and div_num_id=?] [and item_num_id=?] AND a.cancelsign = 'N' ORDER BY a.last_updtme DESC,a.create_dtme DESC