I'm using this statement on https://overpass-turbo.eu/:
[timeout:900];
area[name="Germany"][admin_level=2][boundary=administrative]->.myarea;
rel(area.myarea)[admin_level=4][boundary=administrative];
out geom;
Why is this returning an empty dataset? First I select the area of germany, then I select all relations which represent the state boundaries. Like this one: http://www.openstreetmap.org/relation/62761#map=8/51.440/7.660
What am I missing?
As the country name is tagged as "Deutschland" rather than "Germany", you need to adjust the .myarea part of your query:
[timeout:900];
area[name="Deutschland"][admin_level=2][boundary=administrative]->.myarea;
rel(area.myarea)[admin_level=4][boundary=administrative];
out geom;
In any case, I would recommend the following faster approach based on tagging schema:
rel[boundary=administrative]["ISO3166-2"~"^DE-"][admin_level=4];
out geom;