query-fc18a0e3227165396793929112c0dd9c
TODO
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#>
SELECT ?item ?itemLabel ?property ?propertyLabel ?value ?valueLabel ?statement
WHERE
{
?item ?ppp ?statement . # there is a triple
?property a wikibase:Property ; # there is a property
wikibase:claim ?ppp . # which has a predicate in the form p:Pnnn
# so the variable ?ppp is a p:Pnnn predicate and ?statement is a property statement
?statement ?qqq ?value. # The ?statement from the last set of clauses is in a triple
?property2 a wikibase:Property ; # there is a property
wikibase:statementProperty ?qqq . # which has a predicate in the form of ps:Pnnn
# so the variable ?qqq is a ps:Pnnn predicate and ?value is 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". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?autre_statement")
v1("?item"):::projected
v2("?ppp")
v4("?property"):::projected
v7("?property2")
v5("?qqq")
v3("?statement"):::projected
v6("?value"):::projected
c9(["bd:serviceParam"]):::iri
c2(["wikibase:Property"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c7(["wd:Q100443909"]):::iri
v1 -->v2--> v3
v4 --"a"--> c2
v4 --"wikibase:claim"--> v2
v3 -->v5--> v6
v7 --"a"--> c2
v7 --"wikibase:statementProperty"--> v5
v3 --"prov:wasDerivedFrom"--> v8
v8 --"p:reference/P248"--> c7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end