query-6ee7faa94231361ef79676a620c73667

rq turtle/ttl

Liste d'institutions de l'UdeM

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 DISTINCT ?udem ?udemLabel ?part ?partLabel ?affiliation ?affiliationLabel ?sponsor ?sponsorLabel ?partnership ?partnershipLabel ?subsid ?subsidLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  VALUES ?univ { wd:Q392189 wd:Q273527 wd:Q273619 wd:Q1054216 wd:Q67182995 wd:Q2945760 wd:Q3152656 wd:Q3151984 wd:Q3145326 wd:Q3145180 }  # et CHUM, Mila, Ste-Justine, gériatrie, MHI, SacréCoeur, Maisonneuve
  ?udem (wdt:P361*|wdt:P749|wdt:P1416/wdt:P361*|wdt:P859|wdt:P2652|wdt:127|wdt:137) ?univ. # partie ou parent organization ou affilié ou sponsor ou proprio ou opérateur 
  FILTER (NOT EXISTS { ?udem wdt:P31 wd:Q5})
  FILTER (NOT EXISTS { ?udem wdt:P31 wd:Q30612})
  OPTIONAL {?udem wdt:P361 ?part.}
  OPTIONAL {?udem wdt:P1416 ?affiliation.}
  OPTIONAL {?udem wdt:P859 ?sponsor.}
  OPTIONAL {?udem wdt:P2652 ?partnership.}  
  OPTIONAL {?udem wdt:P749 ?subsid.}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?affiliation"):::projected v3("?part"):::projected v6("?partnership"):::projected v5("?sponsor"):::projected v7("?subsid"):::projected v1("?udem"):::projected v2("?univ") a1((" ")) c5(["bd:serviceParam"]):::iri c3(["wd:Q5"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q30612"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P31"--> e0c2 e0v1("?udem"):::projected e0c2(["wd:Q30612"]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> c2 v1 --"wdt:P31"--> c2 f1[["not "]] subgraph f1e1["Exists Clause"] e1v1 --"wdt:P31"--> e1c2 e1v1("?udem"):::projected e1c2(["wd:Q5"]):::iri end f1--EXISTS--> f1e1 f1 --> v1 f1 --> c1 f1 --> c3 v1 --"wdt:P31"--> c3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end bind2[/VALUES ?univ/] bind2-->v2 bind20(["wd:Q392189"]) bind20 --> bind2 bind21(["wd:Q273527"]) bind21 --> bind2 bind22(["wd:Q273619"]) bind22 --> bind2 bind23(["wd:Q1054216"]) bind23 --> bind2 bind24(["wd:Q67182995"]) bind24 --> bind2 bind25(["wd:Q2945760"]) bind25 --> bind2 bind26(["wd:Q3152656"]) bind26 --> bind2 bind27(["wd:Q3151984"]) bind27 --> bind2 bind28(["wd:Q3145326"]) bind28 --> bind2 bind29(["wd:Q3145180"]) bind29 --> bind2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; subgraph union5[" Union "] subgraph union5l[" "] style union5l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:137"--> v2 end subgraph union5r[" "] style union5r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:127"--> v2 end union5r <== or ==> union5l end end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P2652"--> v2 end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P859"--> v2 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P1416"--> a1 a1 --"wdt:P361"--> v2 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P749"--> v2 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P361"--> v2 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P361".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1416".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P859".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2652".-> v6 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P749".-> v7 end