query-9e8c7ebc30106218c9123e0a871425d0

rq turtle/ttl

Projects and museums in contextde: Projekte im Kontext mit den Museen

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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Graph
SELECT ?nodeFrom ?nodeFromLabel ?nodeImage ?rgb ?edgeLabel ?nodeTo ?nodeToLabel ?nodeToImage
WHERE
{ 
  {
    SELECT
      (?project AS ?nodeFrom)      
      (?projectImage AS ?nodeFromImage)
      ("2e86c1" AS ?rgb)
      ("award received" AS ?edgeLabel)      
      (?award AS ?nodeTo) 
      (?awardImage AS ?nodeToImage)
    WHERE 
    {
      ?project p:P166 ?awardStatement.      
      ?awardStatement ps:P166 ?award.
      ?award wdt:P361 wd:Q106748908.
      OPTIONAL { ?project wdt:P18 ?projectImage. }
      OPTIONAL { ?award wdt:P18 ?awardImage. }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
    }
  }
  UNION
  {
    SELECT 
      (?project AS ?nodeFrom)        
      (?projectImage AS ?nodeFromImage)  
      ("2e86c1" AS ?rgb)
      ("creator" AS ?edgeLabel)      
      (?creator AS ?nodeTo)  
      (?creatorImage AS ?nodeToImage)
    WHERE 
    {
      ?project p:P166 ?awardStatement.      
      ?awardStatement ps:P166 ?award.
      ?award wdt:P361 wd:Q106748908.
      ?project wdt:P170 ?creator.
      OPTIONAL { ?creator wdt:P18 ?creatorImage. }
      OPTIONAL { ?project wdt:P18 ?projectImage. }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
    }
  } 
  UNION  
  {
    SELECT 
      (?award AS ?nodeFrom)  
      (?awardImage AS ?nodeFromImage)          
      ("ec7063" AS ?rgb)
      ("part of" AS ?edgeLabel)      
      (wd:Q106748908 AS ?nodeTo)
      (?digamusAwardImage AS ?nodeToImage)
    WHERE 
    {
      ?project p:P166 ?awardStatement.
      ?awardStatement ps:P166 ?award.
      ?award wdt:P361 wd:Q106748908.
      OPTIONAL { ?award wdt:P18 ?awardImage. }
      OPTIONAL { wd:Q106748908 wdt:P18 ?digamusAwardImage. }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
    }
  }
  UNION
  {
    SELECT
      (?project AS ?nodeFrom)      
      (?projectImage AS ?nodeFromImage)
      ("2ecc71" AS ?rgb)
      ("nominated" AS ?edgeLabel)      
      (?award AS ?nodeTo) 
      (?awardImage AS ?nodeToImage)
    WHERE 
    {
      ?project p:P1411 ?awardStatement.
      FILTER ( NOT EXISTS { ?project wdt:P166 [] } )
      ?awardStatement ps:P1411 ?award.
      ?award wdt:P361 wd:Q106748908.      
      OPTIONAL { ?project wdt:P18 ?projectImage. }
      OPTIONAL { ?award wdt:P18 ?awardImage. }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
    }
  }
  UNION
  {
    SELECT 
      (?project AS ?nodeFrom)        
      (?projectImage AS ?nodeFromImage)  
      ("2ecc71" AS ?rgb)
      ("creator" AS ?edgeLabel)      
      (?creator AS ?nodeTo)  
      (?creatorImage AS ?nodeToImage)
    WHERE 
    {
      ?project p:P1411 ?awardStatement.
      FILTER ( NOT EXISTS { ?project wdt:P166 [] } )
      ?awardStatement ps:P1411 ?award.
      ?award wdt:P361 wd:Q106748908.      
      ?project wdt:P170 ?creator.
      OPTIONAL { ?creator wdt:P18 ?creatorImage. }
      OPTIONAL { ?project wdt:P18 ?projectImage. }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
    }
  }  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }  
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?award") v5("?awardImage") v2("?awardStatement") v12("?creator") v13("?creatorImage") v14("?digamusAwardImage") v15("?edgeLabel"):::projected v15("?nodeFrom"):::projected v15("?nodeFromImage") v15("?nodeTo"):::projected v15("?nodeToImage"):::projected v1("?project") v4("?projectImage") v15("?rgb"):::projected a1((" ")) a2((" ")) c9(["de"]):::literal c4(["wd:Q106748908"]):::iri c7(["bd:serviceParam"]):::iri 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; f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:direct/P166"--> e0a1 e0v1("?project"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c11 f0 --> a2 v1 --"p:direct/P166"--> a2 v1 --"p:P1411"--> v2 v2 --"p:statement/P1411"--> v3 v3 --"p:direct/P361"--> c4 v1 --"p:direct/P170"--> v12 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v12 -."p:direct/P18".-> v13 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P18".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind1[/"?project"/] v1 --o bind1 bind1 --as--o v15 bind2[/"?projectImage"/] v4 --o bind2 bind2 --as--o v15 bind3[/"'2ecc71'"/] bind3 --as--o v15 bind4[/"'creator'"/] bind4 --as--o v15 bind5[/"?creator"/] v12 --o bind5 bind5 --as--o v15 bind6[/"?creatorImage"/] v13 --o bind6 bind6 --as--o v15 end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; f7[["not "]] subgraph f7e1["Exists Clause"] e1v1 --"p:direct/P166"--> e1a1 e1v1("?project"):::projected e1a1((" ")):::projected end f7--EXISTS--> f7e1 f7 --> v1 f7 --> c11 f7 --> a1 v1 --"p:direct/P166"--> a1 v1 --"p:P1411"--> v2 v2 --"p:statement/P1411"--> v3 v3 --"p:direct/P361"--> c4 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P18".-> v4 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P18".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind8[/"?project"/] v1 --o bind8 bind8 --as--o v15 bind9[/"?projectImage"/] v4 --o bind9 bind9 --as--o v15 bind10[/"'2ecc71'"/] bind10 --as--o v15 bind11[/"'nominated'"/] bind11 --as--o v15 bind12[/"?award"/] v3 --o bind12 bind12 --as--o v15 bind13[/"?awardImage"/] v5 --o bind13 bind13 --as--o v15 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P166"--> v2 v2 --"p:statement/P166"--> v3 v3 --"p:direct/P361"--> c4 subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P18".-> v5 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; c4 -."p:direct/P18".-> v14 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind14[/"?award"/] v3 --o bind14 bind14 --as--o v15 bind15[/"?awardImage"/] v5 --o bind15 bind15 --as--o v15 bind16[/"'ec7063'"/] bind16 --as--o v15 bind17[/"'part of'"/] bind17 --as--o v15 bind18[/"'wd:Q106748908'"/] bind18 --as--o v15 bind19[/"?digamusAwardImage"/] v14 --o bind19 bind19 --as--o v15 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P166"--> v2 v2 --"p:statement/P166"--> v3 v3 --"p:direct/P361"--> c4 v1 --"p:direct/P170"--> v12 subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v12 -."p:direct/P18".-> v13 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P18".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind20[/"?project"/] v1 --o bind20 bind20 --as--o v15 bind21[/"?projectImage"/] v4 --o bind21 bind21 --as--o v15 bind22[/"'2e86c1'"/] bind22 --as--o v15 bind23[/"'creator'"/] bind23 --as--o v15 bind24[/"?creator"/] v12 --o bind24 bind24 --as--o v15 bind25[/"?creatorImage"/] v13 --o bind25 bind25 --as--o v15 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P166"--> v2 v2 --"p:statement/P166"--> v3 v3 --"p:direct/P361"--> c4 subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P18".-> v4 end subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P18".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind26[/"?project"/] v1 --o bind26 bind26 --as--o v15 bind27[/"?projectImage"/] v4 --o bind27 bind27 --as--o v15 bind28[/"'2e86c1'"/] bind28 --as--o v15 bind29[/"'award received'"/] bind29 --as--o v15 bind30[/"?award"/] v3 --o bind30 bind30 --as--o v15 bind31[/"?awardImage"/] v5 --o bind31 bind31 --as--o v15 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end