German is the most widely spoken language in the European Union—and arguably the most important language of Central Europe. It shouldn’t be surprising, then, that a large number of pupils in Central European countries learn German at school as a foreign language, as the following map shows (the map is based on data by Eurostat (2012) for general upper secondary education, excluding vocational schools):
A few notes are in order here. First and foremost, the percentages should not be understood as indicators of the percentages of people who can actually speak German within each given country, because most people who learned a second or third foreign language at school (after English) gradually lose the ability to speak it over time (and some do not complete upper secondary education at all). You can see the percentages of actual speakers here.
A significant exception is the Netherlands and Denmark, where more people are capable of speaking German than just those who learned German at school. This is probably caused by the linguistic and geographical proximity of Dutch and German, resp. Danish and German, which makes achieving proficiency in German both easy and desirable for native speakers of Dutch and Danish, even without any formal education.
In Germany and Austria, (a dialect of) German is the native language of the vast majority of pupils. In Switzerland, a German variety (called Swiss German) is the native language of about 64% of people, but native speakers of other languages spoken in Switzerland also virtually always learn German as a foreign language. Eurostat does not provide data for these three countries because it considers German to be a native language there. For the sake of consistency, I show the value as 100 in the map.
The national language of Luxembourg is Luxembourgish, which is very closely related to Standard German, so learning Standard German is not significantly more difficult for a Luxembourgish pupil than for speakers of German dialects in Germany, and, in fact, 100% of pupils (in upper secondary education) in Luxembourg learn German as a foreign language.