the sugar content of raw corn on the vs cooked corn on the cob
This is a difficult question, as there are many different varieties of corn on the cob -- the stuff sold in the United States is typically significantly sweeter than that grown in Europe.

Once cut, corn starts a process that will convert its sugars to starch.  To make store-bought corn taste like fresh cut corn, they've specifically bred corn varieties that are extra sweet.  'Sweet' corn used to have a sugar concentration of around 10%.  Today's 'Supersweet' varietals are closer to 30%, and the sugar lasts longer after it's been harvested.

Cooking stops the breakdown of the sugars, so if you cook freshly cut corn, it'll have more sugar than a similar ear that's let sit for a few days (in transit, in a grocery store, etc.)

If you're buying raw corn on the cob in the grocery store, it will likely have less sugar in it than that same variety sold as cooked corn, simply because they'd have cooked it within a day of the harvest, if not the same day.

However, variety can play just as much of a role, as 'sweet corn' cooked an hour after harvest might still have less sugar than raw 'supersweet corn' a day after harvest.