query-5639de61c070ec5efc63b2d79b13b346

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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel 
WHERE 
{
  VALUES ?type {wd:Q183816 wd:Q849697} # masters, doctorate
  ?item p:P69 ?statement .             # there is a P69 statement
  ?statement ps:P69 wd:Q219563 .       # its value is UofW
  ?statement pq:P512/wdt:P279* ?type . # having a qualifier which is, or which is a subclass of masters or doctorate
     # hint (might) make it go faster. Not really necessary perhaps
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v3("?statement") v1("?type") a1((" ")) c3(["wd:Q219563"]):::iri c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/VALUES ?type/] bind0-->v1 bind00(["wd:Q183816"]) bind00 --> bind0 bind01(["wd:Q849697"]) bind01 --> bind0 v2 --"p:P69"--> v3 v3 --"p:statement/P69"--> c3 v3 --"p:qualifier/P512"--> a1 a1 --"p:direct/P279"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end