query: # places in Scotland according to P131, having a single P131
  
  select ?item ?itemLabel ?itemDescription ?elseLabel ?terrainLabel
  with { select ?item ?else ?coords where {
     ?item wdt:P131 ?else  .
    ?else wdt:P31 wd:Q15060255  .
    } } as %f
  where
  {
    include %f
   
    filter not exists { ?item wdt:P131 ?else2 .   {?else2 wdt:P31 wd:Q15060255 .} UNION {?else2 wdt:P131* wd:Q21. hint:Prior hint:gearing "forward".} filter(str(?else2) != str(?else)) } 
    optional{ ?item wdt:P706 ?terrain . }
    ?item wdt:P31/wdt:P279* wd:Q486972 . hint:Prior hint:gearing "forward".
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
                           ?else rdfs:label ?elseLabel.
                           ?item rdfs:label ?itemLabel .
                           ?item schema:description ?itemDescription .
                           ?terrain rdfs:label ?terrainLabel .} 
  }
  
  