query-0d7200c4add1daf9f33ee97be8961c6c

rq turtle/ttl

Authors/ Writers with links to Odia Wikipedia or Wikisource, but missing VIAF id SELECT ?item ?statements ?itemLabel WHERE { ?item wdt:P31 wd:Q5 . ?item wdt:P106 wd:Q36180 . #?item wdt:P1412 wd:Q33810 . # Here we ask people with no VIAF id FILTER NOT EXISTS { ?item wdt:P214 ?viaf . } # But the ones we already know they don't have one show up anyway # so we filter out people with "No value" for VIAF id FILTER NOT EXISTS { ?item rdf:type wdno:P214 . }

?wikilink schema:about ?item . { ?wikilink schema:isPartOf https://or.wikisource.org/ . } UNION {?wikilink schema:isPartOf https://or.wikipedia.org/ . } ?item wikibase:statements ?statements .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . } } ORDER BY DESC(?statements)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Authors/ Writers with links to Odia Wikipedia or Wikisource, but missing VIAF id
SELECT ?item ?statements ?itemLabel 
WHERE {
  ?item wdt:P31 wd:Q5 .
  ?item wdt:P106 wd:Q36180 .
  #?item wdt:P1412 wd:Q33810 . 
  # Here we ask people with no VIAF id
  FILTER NOT EXISTS { ?item wdt:P214 ?viaf . }
  # But the ones we already know they don't have one show up anyway
  # so we filter out people with "No value" for VIAF id
  FILTER NOT EXISTS { ?item rdf:type wdno:P214 . }

  ?wikilink schema:about ?item .
  { ?wikilink schema:isPartOf <https://or.wikisource.org/> . } 
  UNION {?wikilink schema:isPartOf <https://or.wikipedia.org/> . }
 ?item wikibase:statements ?statements .  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
ORDER BY DESC(?statements)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?statements"):::projected v3("?viaf") v4("?wikilink") c2(["wdno:P214"]):::iri c11([https://or.wikipedia.org/]):::iri c10([https://or.wikisource.org/]):::iri c7(["wd:Q36180"]):::iri c14(["bd:serviceParam"]):::iri c5(["wd:Q5"]):::iri c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"a"--> e0c2 e0v1("?item"):::projected e0c2(["wdno:P214"]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> c2 v2 --"a"--> c2 f1[["not "]] subgraph f1e1["Exists Clause"] e1v1 --"wdt:P214"--> e1v2 e1v1("?item"):::projected e1v2("?viaf"):::projected end f1--EXISTS--> f1e1 f1 --> v2 f1 --> c3 f1 --> v3 v2 --"wdt:P214"--> v3 v2 --"wdt:P31"--> c5 v2 --"wdt:P106"--> c7 v4 --"schema:about"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 --"schema:isPartOf"--> c11 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"schema:isPartOf"--> c10 end union0r <== or ==> union0l end v2 --"wikibase:statements"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end