query-a93171443d6e6047421efd712a1a2f93

rq turtle/ttl

Predicates for filtering predicates that use PIDsThe following query could be used to experiment with predicates and how they could be used to filter in predicates that contain a property identifier (aka PID).

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdtn: <http://www.wikidata.org/prop/direct-normalized/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX psn: <http://www.wikidata.org/prop/statement/value-normalized/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prv: <http://www.wikidata.org/prop/reference/value/>
PREFIX prn: <http://www.wikidata.org/prop/reference/value-normalized/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?predicate ?property {
  VALUES ?predicate {
    p:P31 # wikibase:claim
    pq:P31 # wikibase:qualifier
    pqn:P2911 # wikibase:qualifierValueNormalized
    pqv:P31 # wikibase:qualifierValue
    pr:P31 # wikibase:reference
    prn:P214 # wikibase:referenceValueNormalized
    prv:P31 # wikibase:referenceValue
    ps:P31 # wikibase:statementProperty
    psn:P356 # wikibase:statementValueNormalized
    psv:P31 # wikibase:statementValue
    wdt:P31 # wikibase:directClaim
    wdtn:P356 # wikibase:directClaimNormalized
  }
  ?property wikibase:directClaimNormalized ?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:qualifier/P31"]) bind01 --> bind0 bind02(["p:qualifier/value-normalized/P2911"]) bind02 --> bind0 bind03(["p:qualifier/value/P31"]) bind03 --> bind0 bind04(["p:reference/P31"]) bind04 --> bind0 bind05(["p:reference/value-normalized/P214"]) bind05 --> bind0 bind06(["p:reference/value/P31"]) bind06 --> bind0 bind07(["p:statement/P31"]) bind07 --> bind0 bind08(["p:statement/value-normalized/P356"]) bind08 --> bind0 bind09(["p:statement/value/P31"]) bind09 --> bind0 bind010(["p:direct/P31"]) bind010 --> bind0 bind011(["p:direct-normalized/P356"]) bind011 --> bind0 v2 --"wikibase:directClaimNormalized"--> v1