query-015060d233ec3bc68751ff297db3a90b

rq turtle/ttl

TODO

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#>
SELECT DISTINCT ?occupation ?occupationLabel ?subclassOf ?subclassOfLabel
WHERE {
  ?occupation wdt:P279*/wdt:P31/wdt:P279* wd:Q66715801
  OPTIONAL {
    ?occupation wdt:P279 ?subclassOf.
#    ?subclassOf rdfs:label ?subclassOfLabel.
#    FILTER (LANG(?subclassOfLabel) = "en")
  }
  #FILTER (LANG(?occupationLabel) = "en")
  SERVICE wikibase:label { 
    bd:serviceParam wikibase:language "en". 
    ?occupation rdfs:label ?occupationLabel.
    ?subclassOf rdfs:label ?subclassOfLabel.
  }
}
ORDER BY ?occupationLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?occupation"):::projected v1("?occupationLabel"):::projected v3("?subclassOf"):::projected v4("?subclassOfLabel"):::projected a1((" ")) a2((" ")) c5(["bd:serviceParam"]):::iri c7(["en"]):::literal c3(["wd:Q66715801"]):::iri v2 --"wdt:P279"--> a1 a1 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P279".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 v2 --"rdfs:label"--> v1 v3 --"rdfs:label"--> v4 end