In the 1880ies cities startet to have their power plants prividing electricity, later gas, water and remote heat (by heated water or steam). Many of them are organized like that still but some of them formed area- or countrywide companies still owned by municipalities. Today part of them are privatized.
Pls ref to https://de.wikipedia.org/wiki/Liste_von_Stadt-_und_Gemeindewerken
inculding several 100 "stadtwerke"
There exists a study of the TU Munich: (Technical University Munich)
Recently nearly all of the are suffering due to Germany turning away from nuclear power plant and encouraging wind energy. The latter makes electricity cheap (wholesale) however for the enduser it is even more expensive since the subventions are added to the consumer price.
The electricity market in the city of Leipzig (European Energy Exchange = EEX) is a highly complicated pricing model. Stuff for dissertations.
please browse "Geschaeftsbericht REW" and so on for their balance sheet reporting
http://www.rwe.com/web/cms/de/2331574/rwe/investor-relations/berichte/2014/ rgs g