query-e302c143a836d5b9caf40658c62adbd5

rq turtle/ttl

...(advanced)(Konsortien und Konsortialbeteiligte)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT (?node AS ?Id) ?Label ?Weight
WHERE {
  {
    ?node wdt:P31 wd:Q98270496 .
  } UNION {
    ?p wdt:P31 wd:Q98270496 . 
    ?p wdt:P1416 ?node .  
  }
  OPTIONAL { FILTER (EXISTS { ?node wdt:P31 wd:Q98270496 })
      BIND("2" AS ?Weight)
  } 
  OPTIONAL { FILTER (NOT EXISTS { ?node wdt:P31 wd:Q98270496 })
      BIND("1" AS ?Weight)
  } 
  ?node rdfs:label ?Label .
  FILTER (lang(?Label) = 'de')
} ORDER BY ASC(?nodeLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?Id") v2("?Label"):::projected v6("?Weight"):::projected v3("?node"):::projected v1("?nodeLabel") v4("?p") c3(["wd:Q98270496"]):::iri f0[["?Label = 'de'"]] f0 --> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P31"--> c3 v4 --"wdt:P1416"--> v3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P31"--> c3 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; bind1[/"'2'"/] bind1 --as--o v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; bind2[/"'1'"/] bind2 --as--o v6 end v3 -."rdfs:label".-> v2 bind3[/"?node"/] v3 --o bind3 bind3 --as--o v6