query-19db0b0d25bc9593c08d62aa670c356a

rq turtle/ttl

list of items of a certain type with an enwiki sitelink but not a hewiki sitelink SELECT DISTINCT ?item ?itemLabel ?article1 WHERE { wd:Q197 ^wdt:P279*/^wdt:P31 ?item . # instance or subclass of airplane ?article1 schema:about ?item; schema:isPartOf https://en.wikipedia.org/. FILTER NOT EXISTS { ?article2 schema:about ?item; schema:isPartOf https://he.wikipedia.org/. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#list of items of a certain type with an enwiki sitelink but not a hewiki sitelink
SELECT DISTINCT ?item ?itemLabel ?article1
WHERE {
   wd:Q197 ^wdt:P279*/^wdt:P31 ?item .  # instance or subclass of airplane
   ?article1 schema:about ?item;
   schema:isPartOf <https://en.wikipedia.org/>.
   FILTER NOT EXISTS {
      ?article2 schema:about ?item;
            schema:isPartOf <https://he.wikipedia.org/>.
   }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?article1"):::projected v1("?article2") v2("?item"):::projected a1((" ")) c7([https://en.wikipedia.org/]):::iri c3([https://he.wikipedia.org/]):::iri c9(["bd:serviceParam"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal c5(["wd:Q197"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"schema:about"--> e0v2 e0v1 --"schema:isPartOf"--> e0c3 e0v1("?article2"):::projected e0v2("?item"):::projected e0c3([https://he.wikipedia.org/]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 f0 --> c2 f0 --> c3 v1 --"schema:about"--> v2 v1 --"schema:isPartOf"--> c3 a1 --"wdt:P279"--> c5 v2 --"wdt:P31"--> a1 v3 --"schema:about"--> v2 v3 --"schema:isPartOf"--> c7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end