I bought a premium economy ticket YUL-ESB at AC website, YUL-MUC (AC code share on Lufthansa) and MUC-ESB (SunExpress). I will be getting 125 % SQM for the whole YUL-ESB flight, right?
There's no earning on SunExpress, the partnership only allows redeeming Aeroplan points on SunExpress flights.
The only exception would be if the SunExpress flight is a wet lease operating for Lufthansa rather than a SunExpress marketed flight. I've seen a couple of those before. Although it doesn't sound like that's what you have.
We also have a calculator that can help figure these things out:
Calculator for SQM, Aeroplan miles, & SQD