query-f22146684900a291acf8a0319f177c6f

rq turtle/ttl

Search for Belgian citizen without EN label SELECT DISTINCT ?item ?nlitemLabel ?itemDescription ?instanceLabel ?nationalityLabel ?professionLabel ?domainLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,nl,fr,de,it,lu,es,no,pt". } VALUES ?instance { wd:Q5 } VALUES ?nationality { wd:Q31 } ?item wdt:P31 ?instance; wdt:P27 ?nationality; rdfs:label ?nlitemLabel. FILTER((LANG(?nlitemLabel)) = "nl") MINUS { ?item rdfs:label ?enitemLabel. FILTER((LANG(?enitemLabel)) = "en") } OPTIONAL { ?item wdt:P106 ?profession. } OPTIONAL { ?item wdt:P101 ?domain. } } ORDER BY (?nlitemLabel)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Search for Belgian citizen without EN label
SELECT DISTINCT ?item ?nlitemLabel ?itemDescription ?instanceLabel ?nationalityLabel ?professionLabel ?domainLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,nl,fr,de,it,lu,es,no,pt". }
  VALUES ?instance { wd:Q5 }
  VALUES ?nationality { wd:Q31 }
  ?item wdt:P31 ?instance;
    wdt:P27 ?nationality;
    rdfs:label ?nlitemLabel.
  FILTER((LANG(?nlitemLabel)) = "nl")
  MINUS {
    ?item rdfs:label ?enitemLabel.
    FILTER((LANG(?enitemLabel)) = "en")
  }
  OPTIONAL { ?item wdt:P106 ?profession. }
  OPTIONAL { ?item wdt:P101 ?domain. }
}
ORDER BY (?nlitemLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?domain") v5("?enitemLabel") v2("?instance") v4("?item"):::projected v3("?nationality") v1("?nlitemLabel"):::projected v6("?profession") c3(["bd:serviceParam"]):::iri c5(["#91;AUTO_LANGUAGE#93;,en,nl,fr,de,it,lu,es,no,pt"]):::literal f0[["?nlitemLabel = 'nl'"]] f0 --> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 end bind1[/VALUES ?instance/] bind1-->v2 bind10(["wd:Q5"]) bind10 --> bind1 bind2[/VALUES ?nationality/] bind2-->v3 bind20(["wd:Q31"]) bind20 --> bind2 v4 --"wdt:P31"--> v2 v4 --"wdt:P27"--> v3 v4 --"rdfs:label"--> v1 subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; f4[["?enitemLabel = 'en'"]] f4 --> v5 v4 --"rdfs:label"--> v5 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P106".-> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P101".-> v7 end