query-b52a5e6e378a148aa02d5a0ae2028928

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 bd: <http://www.bigdata.com/rdf#>
SELECT ?doctor ?doctorLabel (sample(?university) as ?univ) {
  ?doctor wdt:P69 ?university 
          ;wdt:P1026 []
          filter not exists { ?doctor wdt:P4536 [] } 
          .
  ?university wdt:P17 wd:Q145 
              ; wdt:P361*/wdt:P31/wdt:P279* wd:Q3918
              .
  service wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

} GROUP BY ?doctor ?doctorLabel  having (count(?university) = 1 ) values (?university) {(wd:Q160302) (wd:Q1851014)}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?_anon_42b5416610844a34809f33a099ae9de1136699") v2("?doctor"):::projected v4("?univ") v1("?university"):::projected a3((" ")) a2((" ")) a4((" ")) a5((" ")) a1((" ")) c10(["wd:Q3918"]):::iri c12(["bd:serviceParam"]):::iri c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal c6(["wd:Q145"]):::iri bind0[/VALUES ?university/] bind0-->v1 bind00(["wd:Q160302"]) bind00 --> bind0 bind01(["wd:Q1851014"]) bind01 --> bind0 f1[[" = '1^^xsd:integer'"]] f1 --> a1 f2[["not "]] subgraph f2e0["Exists Clause"] e0v1 --"wdt:P4536"--> e0a1 e0v1("?doctor"):::projected e0a1((" ")):::projected end f2--EXISTS--> f2e0 f2 --> v2 f2 --> c2 f2 --> a2 v2 --"wdt:P4536"--> a2 v2 --"wdt:P69"--> v1 v2 --"wdt:P1026"--> a3 v1 --"wdt:P17"--> c6 v1 --"wdt:P361"--> a4 a4 --"wdt:P31"--> a5 a5 --"wdt:P279"--> c10 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end bind5[/"count(?university)"/] v1 --o bind5 bind5 --as--o v3 bind6[/"sample(?university)"/] v1 --o bind6 bind6 --as--o v4