alan_gr
(Alan)
4
I’m not sure I understand “ISO3166-1:alpha3”=“DEU”. The admin_level=“6” parts makes sense to me, as it is a key/value pair you would expect to find in the administrative units you are looking for, e.g. “https://www.openstreetmap.org/relation/62385”. But there isn’t a key called ISO3166-1:alpha3. Have you seen this working in another example? (I am not very familiar with Overpass myself so this might just be my own lack of knowledge).
More generally, you seem to have made several changes relative to the example, which I assume you took from “Count Pharmacies per County” here https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example. Have you tried making the changes one at a time to identify where things go wrong? E.g. start by simply replacing pharmacy with pub, and so on.
I don’t think regio is part of the language syntax, it is just the name given to the element you are looping over. So long as it is consistent in each place it occurs, I don’t think it should be a problem.