Filtering Overpass-API by country

Using Overpass turbo, the syntax is:

area["name"="Nordrhein-Westfalen"]->.boundaryarea;
(
nwr(area.boundaryarea)[amenity=bank];
);
out meta;

nwr is a short for node-way-relation


The Quick OSM plugin for QGIS generates the following working Overpass query:

<osm-script output="xml" timeout="200"> 
 <id-query {{nominatimArea:Austria}} into="area"/> 
 <union>
      <query type="node">
           <has-kv k="amenity" v="bank"/> 
           <area-query from="area"/>
      </query>
      <query type="way">
           <has-kv k="amenity" v="bank"/> 
           <area-query from="area"/>
      </query>
      <query type="relation">
           <has-kv k="amenity" v="bank"/> 
           <area-query from="area"/>
      </query>
 </union>
 <union>
      <item />
      <recurse type="down"/>
 </union>
 <print mode="body" />
</osm-script>

for details see Overpass turbo/Extended Overpass Queries