LEFT JOIN mm_rfq_sup_mats AS sm ON rm.rfq_id = sm.rfq_id  AND sm.rfq_mat_data_id = rm.rfq_mat_data_id AND rs.supplier_id = sm.supplier_idLEFT JOIN mm_rfq_sup_mats AS sm ON rm.rfq_id = sm.rfq_id  AND sm.rfq_mat_data_id = rm.rfq_mat_data_id AND rs.supplier_id = sm.supplier_id