Use GROUP_CONCAT to combine multiple payment reference codes into a single comma-separated value, and group only by sale_id to correctly handle sales with multiple payment records. Signed-off-by: Travis Garrison <travis@chiraqbookstore.com>