query-8ac934d48febbc0feb433c92cb6e5966

rq turtle/ttl

Propertiessaid to be the same as (P460)different from (P1889)instance of (P31)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?instanceLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?item wdt:P460 ?notequal;
    wdt:P1889 ?sameas;
    wdt:P31 ?instance.
  FILTER(?notequal = ?sameas)
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?instance") v3("?item"):::projected v1("?notequal") v2("?sameas") c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?notequal = ?sameas"]] f0 --> v1 f0 --> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v3 --"wdt:P460"--> v1 v3 --"wdt:P1889"--> v2 v3 --"wdt:P31"--> v4