query-a4fa99c7dba3f2d6591521150b0e2bd3

rq turtle/ttl

Occupations with a German label Occupations with a German label Occupations with a German label Professions qui possèdent un libellé en allemand Occupations with a German label Beroepen met een Duits label Occupations with a German label Occupations with a German label Occupations with a German label Occupations with a German label

Use at

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#>
SELECT DISTINCT ?occ ?occLabelEN ?occLabelDE {
  ?occ (wdt:P31/wdt:P31* | wdt:P279/wdt:P279*) wd:Q12737077 .
  FILTER NOT EXISTS { ?occ wdt:P31 wd:Q5 }
  FILTER NOT EXISTS { ?occ wdt:P31 wd:Q13406463 }
  FILTER ( ?occ != wd:Q28640 )
  ?occ rdfs:label ?occLabelDE filter (lang(?occLabelDE) = "de") .
  OPTIONAL {
    ?occ rdfs:label ?occLabelEN filter (lang(?occLabelEN) = "en")
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?occ"):::projected v1("?occLabelDE"):::projected v3("?occLabelEN"):::projected a1((" ")) a2((" ")) c7(["wd:Q12737077"]):::iri c5(["wd:Q5"]):::iri c4(["wd:Q13406463"]):::iri f0[["?occLabelDE = 'de'"]] f0 --> v1 f1[["?occ != 'wd:Q28640'"]] f1 --> v2 f2[["not "]] subgraph f2e0["Exists Clause"] e0v1 --"wdt:P31"--> e0c2 e0v1("?occ"):::projected e0c2(["wd:Q13406463"]):::iri end f2--EXISTS--> f2e0 f2 --> v2 f2 --> c3 f2 --> c4 v2 --"wdt:P31"--> c4 f3[["not "]] subgraph f3e1["Exists Clause"] e1v1 --"wdt:P31"--> e1c2 e1v1("?occ"):::projected e1c2(["wd:Q5"]):::iri end f3--EXISTS--> f3e1 f3 --> v2 f3 --> c3 f3 --> c5 v2 --"wdt:P31"--> c5 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P279"--> a2 a2 --"wdt:P279"--> c7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> a1 a1 --"wdt:P31"--> c7 end union0r <== or ==> union0l end v2 --"rdfs:label"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."rdfs:label".-> v3 end