query-1f049aede2b7501254c94f39288286b2

rq turtle/ttl

Too generic office used instead for a specific one for that organization. That risks messing up the results when fetching the leaders. We should work on switching all of these. (Q30185)mayor Using the query below, we can see that there are many public organizations using the generic item for

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?typeLabel WHERE {
  VALUES ?bad_office {
    wd:Q30185 # mayor
    }
  ?item wdt:P2388|wdt:P1313 ?bad_office .
  ?item wdt:P17 wd:Q928 .
  ?item wdt:P31 ?type .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?typeLabel ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?bad_office") v4("?item"):::projected v2("?itemLabel"):::projected v5("?type") v1("?typeLabel"):::projected c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q928"]):::iri bind0[/VALUES ?bad_office/] bind0-->v3 bind00(["wd:Q30185"]) bind00 --> bind0 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P1313"--> v3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P2388"--> v3 end union0r <== or ==> union0l end v4 --"wdt:P17"--> c4 v4 --"wdt:P31"--> v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end