query-34a178250fe28047fe3316a2af78563a

rq turtle/ttl

title: de-at only SELECT DISTINCT ?item ?itemLabel ?itemDescription ?labelDe ?labelAt ?DescrAt ?AliasAt ?labelEn WHERE { ?item wdt:P17 wd:Q40 . minus { ?item rdfs:label ?labelDe . FILTER(LANG(?labelDe) = 'de') . } minus { ?item schema:description ?DescrDe . FILTER(LANG(?DescrDe) = 'de') . } minus { ?item skos:altLabel ?AliasDe . FILTER(LANG(?AliasDe) = 'de') . } OPTIONAL { ?item rdfs:label ?labelAt . FILTER(LANG(?labelAt) = 'de-at') . } OPTIONAL { ?item schema:description ?DescrAt . FILTER(LANG(?DescrAt) = 'de-at') . } OPTIONAL { ?item skos:altLabel ?AliasAt . FILTER(LANG(?AliasAt) = 'de-at') . } OPTIONAL { ?item rdfs:label ?labelEn . FILTER(LANG(?labelEn) = 'en') . } #filter (bound (?labelAt) != bound (?labelEn)) filter (?labelAt != "")

}

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#title: de-at only 
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?labelDe ?labelAt  ?DescrAt ?AliasAt ?labelEn WHERE {
    ?item wdt:P17 wd:Q40 .
    minus {
      ?item rdfs:label ?labelDe .
      FILTER(LANG(?labelDe) = 'de') .
    }
    minus {
      ?item schema:description ?DescrDe .
      FILTER(LANG(?DescrDe) = 'de') .
    }
    minus {
      ?item skos:altLabel ?AliasDe .
      FILTER(LANG(?AliasDe) = 'de') .
    }
    OPTIONAL {
      ?item rdfs:label ?labelAt .
      FILTER(LANG(?labelAt) = 'de-at') .
    }
    OPTIONAL {
      ?item schema:description ?DescrAt .
      FILTER(LANG(?DescrAt) = 'de-at') .
    }
    OPTIONAL {
      ?item skos:altLabel ?AliasAt .
      FILTER(LANG(?AliasAt) = 'de-at') .
    }
    OPTIONAL {
      ?item rdfs:label ?labelEn .
      FILTER(LANG(?labelEn) = 'en') .
    }
  #filter (bound (?labelAt) != bound (?labelEn))
  filter (?labelAt != "")

  }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?AliasAt"):::projected v8("?AliasDe") v4("?DescrAt"):::projected v7("?DescrDe") v5("?item"):::projected v1("?labelAt"):::projected v6("?labelDe"):::projected v2("?labelEn"):::projected c5(["wd:Q40"]):::iri f0[["?labelAt != ''"]] f0 --> v1 v5 --"wdt:P17"--> c5 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; f2[["?labelDe = 'de'"]] f2 --> v6 v5 --"rdfs:label"--> v6 end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; f4[["?DescrDe = 'de'"]] f4 --> v7 v5 --"schema:description"--> v7 end subgraph minus5["MINUS"] style minus5 stroke-width:6px,fill:pink,stroke:red; f6[["?AliasDe = 'de'"]] f6 --> v8 v5 --"skos:altLabel"--> v8 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."rdfs:label".-> v1 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."schema:description".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."skos:altLabel".-> v3 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v5 -."rdfs:label".-> v2 end