query-61df1d68dfa0789d997c5d4a4ea7eba3

rq turtle/ttl

Advisors without Academic Tree ID (P2381) of students with the ID

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?advisor ?advisorLabel WHERE 
{
  ?student wdt:P184 ?advisor.
  ?student wdt:P2381 [].
  MINUS {?advisor wdt:P2381 []}
  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("?advisor"):::projected v1("?student") a1((" ")) a2((" ")) c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P184"--> v2 v1 --"wdt:P2381"--> a1 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v2 --"wdt:P2381"--> a2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end