query-8b8ede370c3be9f82e8f14c70a8a11d0

rq turtle/ttl

TODO

Use at

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 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) ?reftype ?ref WHERE 
{
values ?item {wd:Q384788} .
?item p:P3872 ?statement.
?statement pq:P585 ?time.
?statement ps:P3872 ?number.
?statement prov:wasDerivedFrom ?statement2 .
?statement2 ?reftype ?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 ?reftype ?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 v9("?number"):::projected v8("?ref"):::projected v7("?reftype"):::projected v3("?statement") v6("?statement2") v4("?time") v9("?year"):::projected c6(["bd:serviceParam"]):::iri c10(["wikibase:DeprecatedRank"]):::iri c8(["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"--> v9 v3 --"prov:wasDerivedFrom"--> v6 v6 -->v7--> v8 bind1[/"year-from-dateTime(?time)"/] v4 --o bind1 bind1 --as--o v9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v3 --"wikibase:rank"--> c10 end bind4[/"sample(?number)"/] v9 --o bind4 bind4 --as--o v9