query-b4cdd80642c932cc0cc4859976f7fe6c
tous les éléments utilisant une certaine référence, ainsi que le chemin y menant SELECT ?item ?itemLabel ?property ?propertyLabel ?value ?valueLabel ?statement WHERE { ?item ?ppp ?statement . # there is a triple having ?statement as its object ?statement ?qqq ?value. # there is a triple having ?statement as its subject # we need ?ppp to be a p:Pnnn and ?qqq to be a ps:Pnnn predicate # so that we know we're in the right part of the data model to be able # to test for a property statement reference. So...
?property a wikibase:Property ; # there is a property wikibase:claim ?ppp ; # which has a predicate in the form p:Pnnn and an object ?ppp # so the variable ?ppp is a p:Pnnn predicate, and ?statement must be a property statement wikibase:statementProperty ?qqq . # and which has a predicate in the form of ps:Pnnn and an object ?qqq # so the variable ?qqq is a ps:Pnnn predicate, and ?value must be the value for this property statement
?statement prov:wasDerivedFrom ?autre_statement. #d'après la source ... # and as you know, the property statement has at least one reference ?autre_statement pr:P248 wd:Q100443909 . # and the reference is 'stated in' 'Q100443909' SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#tous les éléments utilisant une certaine référence, ainsi que le chemin y menant
SELECT ?item ?itemLabel ?property ?propertyLabel ?value ?valueLabel ?statement
WHERE
{
?item ?ppp ?statement . # there is a triple having ?statement as its object
?statement ?qqq ?value. # there is a triple having ?statement as its subject
# we need ?ppp to be a p:Pnnn and ?qqq to be a ps:Pnnn predicate
# so that we know we're in the right part of the data model to be able
# to test for a property statement reference. So...
?property a wikibase:Property ; # there is a property
wikibase:claim ?ppp ; # which has a predicate in the form p:Pnnn and an object ?ppp
# so the variable ?ppp is a p:Pnnn predicate, and ?statement must be a property statement
wikibase:statementProperty ?qqq . # and which has a predicate in the form of ps:Pnnn and an object ?qqq
# so the variable ?qqq is a ps:Pnnn predicate, and ?value must be the value for this property statement
?statement prov:wasDerivedFrom ?autre_statement. #d'après la source ... # and as you know, the property statement has at least one reference
?autre_statement pr:P248 wd:Q100443909 . # and the reference is 'stated in' 'Q100443909'
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}