query-e2305d908c262710c1044c20a7d7d6f1
Propertiesinstance of (P31)award received (P166)point in time (P585)
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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/>
#Odisha Sahitya Akademi Awardees per year
#defaultView:BarChart
SELECT ?year (count(?item) as ?cnt) WHERE{
?item wdt:P31 wd:Q5. # <<<<<< Item = Human
?item p:P166 ?award.
?award ps:P166 ?awardval.
{ ?award ps:P166 wd:Q6596243. } # <<<<<< Award = Odisha Sahitya Akademi
OPTIONAL { ?award pq:P585 ?time. }# <<<<<< Award has a time statementÂ
BIND(str(year(?time)) as ?year)
FILTER(bound(?year))
}
GROUP BY ?year
ORDER BY ?year
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?award")
v4("?awardval")
v6("?cnt")
v2("?item"):::projected
v5("?time")
v6("?year"):::projected
c2(["wd:Q5"]):::iri
c5(["wd:Q6596243"]):::iri
f0[["bound(?year)"]]
f0 --> v6
v2 --"p:direct/P31"--> c2
v2 --"p:P166"--> v3
v3 --"p:statement/P166"--> v4
v3 --"p:statement/P166"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P585".-> v5
end
bind1[/"str(year-from-dateTime(?time))"/]
v5 --o bind1
bind1 --as--o v6
bind3[/"count(?item)"/]
v2 --o bind3
bind3 --as--o v6