query-6ce87cb6f367a6778009697dbfb03cdf

rq turtle/ttl

Asteroids without MP identifier

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#>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema: <http://schema.org/>

SELECT ?item ?statements ?itemLabel WHERE {
  ?item wdt:P31 wd:Q3863.
  ?wikilink schema:about ?item.
  { ?wikilink schema:isPartOf <https://en.wikisource.org/>. }
  UNION
  { ?wikilink schema:isPartOf <https://en.wikipedia.org/>. }
  ?item wikibase:statements ?statements.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  FILTER(NOT EXISTS { ?item wdt:P5736 ?viaf. })
  FILTER(NOT EXISTS { ?item rdf:type wdno:P5736. })
}
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:P5736"]):::iri c9([https://en.wikipedia.org/]):::iri c12(["bd:serviceParam"]):::iri c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal c8([https://en.wikisource.org/]):::iri c5(["wd:Q3863"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"a"--> e0c2 e0v1("?item"):::projected e0c2(["wdno:P5736"]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> c2 v2 --"a"--> c2 f1[["not "]] subgraph f1e1["Exists Clause"] e1v1 --"wdt:P5736"--> e1v2 e1v1("?item"):::projected e1v2("?viaf"):::projected end f1--EXISTS--> f1e1 f1 --> v2 f1 --> c3 f1 --> v3 v2 --"wdt:P5736"--> v3 v2 --"wdt:P31"--> c5 v4 --"schema:about"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 --"schema:isPartOf"--> c9 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"schema:isPartOf"--> c8 end union0r <== or ==> union0l end v2 --"wikibase:statements"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end