query-599c7069980e1f6092d1453443b4021e

rq turtle/ttl

Counts by decade

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
#defaultView:LineChart
SELECT ?decade (COUNT(DISTINCT ?item) as ?ct) 
{

    ?item wdt:P735 wd:Q2829505 ; wdt:P569 ?b . 
    ?item p:P569/psv:P569 [ wikibase:timeValue ?b ; wikibase:timePrecision ?precision ]  
    FILTER(?precision > 7 )  
    BIND( (FLOOR(YEAR(?b)/10)*10) as ?decade) 
}  
GROUP BY ?decade
ORDER BY ?decade

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?b") v5("?ct") v5("?decade"):::projected v3("?item"):::projected v2("?precision") a2((" ")) a1((" ")) c3(["wd:Q2829505"]):::iri f0[["?precision > '7^^xsd:integer'"]] f0 --> v2 v3 --"p:direct/P735"--> c3 v3 --"p:direct/P569"--> v4 a1 --"wikibase:timeValue"--> v4 a1 --"wikibase:timePrecision"--> v2 v3 --"p:P569"--> a2 a2 --"p:statement/value/P569"--> a1 bind1[/"numeric-floor(year-from-dateTime(?b) / '10^^xsd:integer') * '10^^xsd:integer'"/] v4 --o bind1 bind1 --as--o v5 bind3[/"count(?item)"/] v3 --o bind3 bind3 --as--o v5