query-a240fc2a9a370be5e9e28500be8b75b2
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?year (sample(?number) as ?number) ?ref WHERE
{
values ?item {wd:Q384788} .
?item p:P3872 ?statement.
?statement pq:P585 ?time.
?statement ps:P3872 ?number.
?statement prov:wasDerivedFrom ?statement2 .
?statement2 pr:P4656 ?ref.
bind (YEAR(?time) AS ?year)
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
MINUS { ?statement wikibase:rank wikibase:DeprecatedRank }
} group by ?year ?item ?itemLabel ?ref
order by ?item desc (?year)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v8("?number"):::projected
v7("?ref"):::projected
v3("?statement")
v6("?statement2")
v4("?time")
v8("?year"):::projected
c7(["bd:serviceParam"]):::iri
c11(["wikibase:DeprecatedRank"]):::iri
c9(["fr"]):::literal
bind0[/VALUES ?item/]
bind0-->v3
bind00(["wd:Q384788"])
bind00 --> bind0
v3 --"p:P3872"--> v3
v3 --"p:qualifier/P585"--> v4
v3 --"p:statement/P3872"--> v8
v3 --"prov:wasDerivedFrom"--> v6
v6 --"p:reference/P4656"--> v7
bind1[/"year-from-dateTime(?time)"/]
v4 --o bind1
bind1 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v3 --"wikibase:rank"--> c11
end
bind4[/"sample(?number)"/]
v8 --o bind4
bind4 --as--o v8