query-83d671675771c71e6c0b48ed74eddb65

rq turtle/ttl

...maximum of one dot per member

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT ?w ?wLabel (SAMPLE(?geo) AS ?geo) 
WHERE 
{
    {
    ?w wdt:P463 wd:Q105757481 .
  } UNION {
    ?p wdt:P31 wd:Q98270496 .
    ?p p:P1416 ?w .
  }
  {?w wdt:P625 ?geo} UNION {?w wdt:P159 ?hauptverwaltung . ?hauptverwaltung wdt:P625 ?geo .} UNION {?w wdt:P131 ?verwaltungseinheit . ?verwaltungseinheit wdt:P625 ?geo .} UNION {?w wdt:P361+ ?parentOrganization . ?parentOrganization wdt:P625 ?geo .}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en" . }
} GROUP BY ?w ?wLabel 
ORDER BY ASC(?wLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?geo"):::projected v5("?hauptverwaltung") v3("?p") v7("?parentOrganization") v6("?verwaltungseinheit") v2("?w"):::projected v1("?wLabel"):::projected c2(["wd:Q105757481"]):::iri c11(["bd:serviceParam"]):::iri c13(["de,en"]):::literal c4(["wd:Q98270496"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P31"--> c4 v3 --"p:P1416"--> v2 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P463"--> c2 end union0r <== or ==> union0l end subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P361"--> v7 v7 --"p:direct/P625"--> v8 end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P131"--> v6 v6 --"p:direct/P625"--> v8 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P159"--> v5 v5 --"p:direct/P625"--> v8 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P625"--> v8 end union1r <== or ==> union1l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end bind1[/"sample(?geo)"/] v8 --o bind1 bind1 --as--o v8