query-99abae54194031ec4c38e9704935343a

rq turtle/ttl

TODO

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 DISTINCT ?item ?itemLabel WHERE 
{
  ?item wdt:P27 wd:Q183.          # has country of citizenship of Germany
  ?item wdt:P27 ?somewhere.       # has a country of citizenship which we bind to ?somewhere
  filter (?somewhere != wd:Q183)  # ?somewhere does not equal Germany
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }    
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?somewhere") c4(["bd:serviceParam"]):::iri c6(["en"]):::literal c1(["wd:Q183"]):::iri f0[["?somewhere != 'wd:Q183'"]] f0 --> v1 v2 --"wdt:P27"--> c1 v2 --"wdt:P27"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end