query-2ae4f7a9543f4aba66d7870aac5c3a2c

rq turtle/ttl

Give me all organizations that contribute to NFDI!

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  ?w ?wLabel
WHERE 
{
    {
    ?w wdt:P463 wd:Q105757481 .
  } UNION {
    ?p wdt:P31 wd:Q98270496 .
    ?p p:P1416 ?statement .
    ?statement ps:P1416 ?w .
    OPTIONAL { ?statement pq:P3831 ?affiliationType .}  
  }
  OPTIONAL {?w wdt:P4871 ?wGeprisID} 
  OPTIONAL {?w wdt:P6782 ?wRORID} 
  FILTER NOT EXISTS {?w  wdt:P31 wd:Q98270496 }  # do nit display consortia associations to Base4NFDI
  BIND(IF(! Bound(?affiliationType), "Vereinsmitglied", ?affiliationTypeLabel) AS ?affiliationTypeLabel)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en" . }
} ORDER BY ASC(?wLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?affiliationType") v8("?affiliationTypeLabel") v3("?p") v4("?statement") v2("?w"):::projected v6("?wGeprisID") v1("?wLabel"):::projected v7("?wRORID") c4(["wd:Q105757481"]):::iri c11(["bd:serviceParam"]):::iri c13(["de,en"]):::literal c2(["wd:Q98270496"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:direct/P31"--> e0c2 e0v1("?w"):::projected e0c2(["wd:Q98270496"]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> c2 v2 --"p:direct/P31"--> c2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P31"--> c2 v3 --"p:P1416"--> v4 v4 --"p:statement/P1416"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P3831".-> v5 end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P463"--> c4 end union0r <== or ==> union0l end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P4871".-> v6 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P6782".-> v7 end bind1[/"if(not bound(?affiliationType),'Vereinsmitglied',?affiliationTypeLabel)"/] v5 --o bind1 v8 --o bind1 bind1 --as--o v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end