market.rate returns one row per submission and program, keyed by submission_id and program.
Compare premiums policy by policy
Pivot the premiums to one row per submission, and compare the programs:Find the overall change
Sum the premiums of the submissions that both programs rate. The proposed program raises the total by 1.81%:Count the unrated submissions by program
Explain one submission in each program
market.explain puts each program’s steps side by side, keyed by program: