query-f6f990f9e4219ef325632abe05a4d857

rq turtle/ttl

Odisha Sahitya Akademi awardees, 243 items @16JUL2020 SELECT ?item ?linkcount ?itemLabel ?itemDescription ?awardyear ?viaf ?ol 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 { ?item wikibase:sitelinks ?linkcount. } # <<<<<< Link count  OPTIONAL { ?award pq:P585 ?time. }# <<<<<< Award has a time statement  BIND(YEAR(?time) AS ?awardyear)

filter(year(?time)=2016)# <<<<<< Filter for Award time = 2016  

OPTIONAL { ?item wdt:P214 ?viaf1. } OPTIONAL { ?item wdt:P648 ?ol1. } BIND(IF(BOUND(?ol1), ?ol1, "no OL identifier") AS ?ol) BIND(IF(BOUND(?viaf1), ?viaf1, "no VIAF identifier") AS ?viaf) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY DESC(?time)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Odisha Sahitya Akademi awardees, 243 items @16JUL2020
SELECT ?item ?linkcount ?itemLabel ?itemDescription ?awardyear ?viaf ?ol 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 { ?item wikibase:sitelinks ?linkcount. } # <<<<<< Link count&nbsp;
OPTIONAL { ?award pq:P585 ?time. }# <<<<<< Award has a time statement&nbsp;
BIND(YEAR(?time) AS ?awardyear)
# filter(year(?time)=2016)# <<<<<< Filter for Award time = 2016&nbsp;&nbsp;
OPTIONAL { ?item wdt:P214 ?viaf1. }
  OPTIONAL { ?item wdt:P648 ?ol1. }
  BIND(IF(BOUND(?ol1), ?ol1, "no OL identifier") AS ?ol)
  BIND(IF(BOUND(?viaf1), ?viaf1, "no VIAF identifier") AS ?viaf)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
 ORDER BY DESC(?time)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?award") v4("?awardval") v6("?awardyear"):::projected v2("?item"):::projected v5("?linkcount"):::projected v9("?ol"):::projected v8("?ol1") v1("?time") v10("?viaf"):::projected v7("?viaf1") c11(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c5(["wd:Q6596243"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal 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; v2 -."wikibase:sitelinks".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P585".-> v1 end bind0[/"year-from-dateTime(?time)"/] v1 --o bind0 bind0 --as--o v6 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P214".-> v7 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P648".-> v8 end bind1[/"if(bound(?ol1),?ol1,'no OL identifier')"/] v8 --o bind1 bind1 --as--o v9 bind2[/"if(bound(?viaf1),?viaf1,'no VIAF identifier')"/] v7 --o bind2 bind2 --as--o v10 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end