query-dfe68488f128d9ee89f34899792d5fdb

rq turtle/ttl

...NFDI associated only

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 ?students ?affiliationTypeLabel ?p ?pLabel ?NFDIassociated {  
  ?w wdt:P31/wdt:P279* wd:Q38723 .
  ?w wdt:P17 wd:Q183 .
  ?w wdt:P2196 ?students .
  { ?w wdt:P463 wd:Q105757481 .
   BIND("Vereinsmitglied" AS ?affiliationTypeLabel)
   BIND(TRUE AS ?NFDIassociated)
  } UNION {
    ?p wdt:P31 wd:Q98270496 .
    ?p p:P1416 ?statement .
    ?statement ps:P1416 ?w .
    OPTIONAL { ?statement pq:P3831 ?affiliationType .}   
    BIND(TRUE AS ?NFDIassociated)
  } 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de" }
} ORDER BY DESC(?students) ASC(?wLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?NFDIassociated"):::projected v8("?affiliationType") v4("?affiliationTypeLabel"):::projected v6("?p"):::projected v7("?statement") v1("?students"):::projected v3("?w"):::projected v2("?wLabel"):::projected a1((" ")) c8(["wd:Q105757481"]):::iri c14(["bd:serviceParam"]):::iri c5(["wd:Q183"]):::iri c16(["#91;AUTO_LANGUAGE#93;,en,de"]):::literal c3(["wd:Q38723"]):::iri c9(["wd:Q98270496"]):::iri v3 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c3 v3 --"p:direct/P17"--> c5 v3 --"p:direct/P2196"--> v1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v6 --"p:direct/P31"--> c9 v6 --"p:P1416"--> v7 v7 --"p:statement/P1416"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v7 -."p:qualifier/P3831".-> v8 end bind0[/"'true^^xsd:boolean'"/] bind0 --as--o v9 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P463"--> c8 bind1[/"'Vereinsmitglied'"/] bind1 --as--o v4 bind2[/"'true^^xsd:boolean'"/] bind2 --as--o v9 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end