query-f0d63c85d5bdac987e5b4ca6b9128d73

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 ?occupation ?occupationLabel ?subclassOf ?subclassOfLabel
WHERE
  ?occupation 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.    
  }
}
ORDER BY ?occupationLabel

Query found at