A developer is using the APEX Assistant to generate a PL/SQL process for calculating bulk discounts. The assistant produces a functionally correct, but poorly performing block of code that uses a cursor FOR loop with nested SELECT statements for each row. What is the most effective refactoring strategy to improve performance while maintaining the logic?