query-dc2d4268d4487698b9d7d8d21a2503c2

rq turtle/ttl

has EN has no ES article SELECT ?item ?itemLabel (group_concat(?typeLabel; separator=", ") as ?instance_of) WHERE { ?item ?property wd:Q77 . # has something to do with Uruguay ?item wdt:P31 ?type . # what sort of thing is it ?type rdfs:label ?typeLabel . filter(lang(?typeLabel)="en") ?article schema:about ?item ; schema:isPartOf https://en.wikipedia.org/ . MINUS {?article2 schema:about ?item ; schema:isPartOf https://es.wikipedia.org/ .} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,es". } } group by ?item ?itemLabel order by ?itemLabel

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# has EN has no ES article
SELECT ?item ?itemLabel (group_concat(?typeLabel; separator=", ") as ?instance_of)
WHERE 
{
  ?item ?property wd:Q77 . # has something to do with Uruguay
  ?item wdt:P31 ?type .    # what sort of thing is it
  ?type rdfs:label ?typeLabel . filter(lang(?typeLabel)="en")
  ?article schema:about ?item ;
          schema:isPartOf <https://en.wikipedia.org/> .
  MINUS {?article2 schema:about ?item ;
          schema:isPartOf <https://es.wikipedia.org/> .}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,es". }
} group by ?item ?itemLabel order by ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?article") v7("?article2") v8("?instance_of") v3("?item"):::projected v1("?itemLabel"):::projected v4("?property") v5("?type") v2("?typeLabel"):::projected c12(["#91;AUTO_LANGUAGE#93;,en,es"]):::literal c7([https://en.wikipedia.org/]):::iri c10(["bd:serviceParam"]):::iri c8([https://es.wikipedia.org/]):::iri c2(["wd:Q77"]):::iri f0[["?typeLabel = 'en'"]] f0 --> v2 v3 -->v4--> c2 v3 --"wdt:P31"--> v5 v5 --"rdfs:label"--> v2 v6 --"schema:about"--> v3 v6 --"schema:isPartOf"--> c7 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v7 --"schema:about"--> v3 v7 --"schema:isPartOf"--> c8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end bind3[/"?typeLabel"/] v2 --o bind3 bind3 --as--o v8