query-c52de3cfd70f787fffa06f2373f72046

rq turtle/ttl

Indian awards without a recepient, 134 items @18Aug2020
SELECT ?award ?linkcount ?awardLabel WHERE { ?award wdt:P31 wd:Q618779. ?award wdt:P17 wd:Q668. OPTIONAL{ ?recipient wdt:P166 ?award } FILTER( !BOUND(?recipient)) OPTIONAL { ?award wikibase:sitelinks ?linkcount. } #count sitelinks SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } ORDER BY DESC(?linkcount)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Indian awards without a recepient, 134 items @18Aug2020  
SELECT ?award ?linkcount ?awardLabel WHERE {
  ?award wdt:P31 wd:Q618779.
  ?award wdt:P17 wd:Q668.
  OPTIONAL{ ?recipient wdt:P166 ?award }
  FILTER( !BOUND(?recipient))
  OPTIONAL { ?award wikibase:sitelinks ?linkcount. }  #count sitelinks
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY DESC(?linkcount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?award"):::projected v1("?linkcount"):::projected v2("?recipient") c2(["wd:Q618779"]):::iri c8(["bd:serviceParam"]):::iri c4(["wd:Q668"]):::iri c10(["en"]):::literal f0[["not bound(?recipient)"]] f0 --> v2 v3 --"wdt:P31"--> c2 v3 --"wdt:P17"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P166".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wikibase:sitelinks".-> v1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end