In one of the samples for querying Wikidata, I found the following query, which includes p:P6/v:P6 in the line after SELECT. What does it mean?
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
SELECT ?p ?w ?l ?wl WHERE {
wd:Q30 p:P6/v:P6 ?p . #-- This line
?p wdt:P26 ?w .
OPTIONAL {
?p rdfs:label ?l filter (lang(?l) = "en") .
}
OPTIONAL {
?w rdfs:label ?wl filter (lang(?wl) = "en").
}
}
It's the SequencePath flavour of a SPARQL 1.1 property path.
wd:Q30 p:P6/v:P6 ?p .
means that there is a triple (wd:Q30, p:P6, ?x)
, and another triple (?x, v:P6, ?p)
, without an explicit need to write (or name) the intermediate node ?x
. In other words, it says: "?p
can be found by starting at wd:Q30
, following property p:P6
, and then property v:P6
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With