query-1d3929e4c54cd4feca1708a4ee6d4890
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?year (count(DISTINCT ?item) as ?count) WHERE {
?item p:P1435 ?stat .
?stat ps:P1435 wd:Q19558910.
?stat a wikibase:BestRank .
optional { ?stat pq:P580 ?start_time. BIND(YEAR(?start_time) as ?year) }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
} group by ?year order by ?year
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count")
v2("?item"):::projected
v4("?start_time")
v3("?stat")
v5("?year"):::projected
c3(["wd:Q19558910"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;"]):::literal
c5(["wikibase:BestRank"]):::iri
v2 --"p:P1435"--> v3
v3 --"p:statement/P1435"--> c3
v3 --"a"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P580".-> v4
bind0[/"year-from-dateTime(?start_time)"/]
v4 --o bind0
bind0 --as--o v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind2[/"count(?item)"/]
v2 --o bind2
bind2 --as--o v5