query-e0a143d5e870cf839e6fd040864f01f1

rq turtle/ttl

To understand this query, you should know that we could filter predicates that correspond to a direct claim (i.e. a claim that have normal or preferred rank) by using wikibase:directClaim. See minimal working example below.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?predicate ?property {
  VALUES ?predicate {
    p:P31
    pr:P31
    pq:P31
    wdt:P31
  }
  ?property wikibase:directClaim ?predicate.
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?predicate"):::projected v2("?property"):::projected bind0[/VALUES ?predicate/] bind0-->v1 bind00(["p:P31"]) bind00 --> bind0 bind01(["p:reference/P31"]) bind01 --> bind0 bind02(["p:qualifier/P31"]) bind02 --> bind0 bind03(["p:direct/P31"]) bind03 --> bind0 v2 --"wikibase:directClaim"--> v1