Information about venues: Difference between revisions

From MtM
(Created page with "Back to the overview of all query topics: back == Pictures of the theatre buildings == <syntaxhighlight lang="sparql" line="1"> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX mmd: <https://mtm.uni-trier.de/entity/> PREFIX mmdt: <https://mtm.uni-trier.de/prop/direct/> #defaultView:ImageGrid SELECT ?theatreBuildingLabel ?image WHERE { ?theatreBuilding mmdt:P3 mmd:Q239. # Theatre building is...")
 
Line 42: Line 42:
</syntaxhighlight>Click here: [http://mtm.uni-trier.de/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fmtm.uni-trier.de%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fmtm.uni-trier.de%2Fentity%2F%3E%0A%0ASELECT%20%3FspielortLabel%20%3Finszenierung%20%3FinszenierungLabel%20WHERE%20%7B%20%20%20%0A%20%20%20%3Finszenierung%20wdt%3AP3%20wd%3AQ309.%20%20%20%23%20Production%20is%20an%20instance%20of%20Production%20%28Q309%29%0A%20%20%20%3Finszenierung%20wdt%3AP8%20%3Fspielort.%20%23%20Production%20has%20a%20venue%20%28e.g.%2C%20a%20theatre%29%20%28P8%29%0A%20%20%20%3Fspielort%20wdt%3AP21%20wd%3AQ237.%20%20%20%20%20%20%23%20The%20venue%20is%20located%20in%20a%20place%20%E2%80%93%20in%20this%20case%20Berlin%20%28Q237%29%0A%20%20%20%0A%20%20%20SERVICE%20wikibase%3Alabel%20%7B%20%20%20%20%20%20%20%20%23%20Adds%20readable%20labels%0A%20%20%20%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%0A%20%20%20%7D%0A%7D Test SPARQL query]
</syntaxhighlight>Click here: [http://mtm.uni-trier.de/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fmtm.uni-trier.de%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fmtm.uni-trier.de%2Fentity%2F%3E%0A%0ASELECT%20%3FspielortLabel%20%3Finszenierung%20%3FinszenierungLabel%20WHERE%20%7B%20%20%20%0A%20%20%20%3Finszenierung%20wdt%3AP3%20wd%3AQ309.%20%20%20%23%20Production%20is%20an%20instance%20of%20Production%20%28Q309%29%0A%20%20%20%3Finszenierung%20wdt%3AP8%20%3Fspielort.%20%23%20Production%20has%20a%20venue%20%28e.g.%2C%20a%20theatre%29%20%28P8%29%0A%20%20%20%3Fspielort%20wdt%3AP21%20wd%3AQ237.%20%20%20%20%20%20%23%20The%20venue%20is%20located%20in%20a%20place%20%E2%80%93%20in%20this%20case%20Berlin%20%28Q237%29%0A%20%20%20%0A%20%20%20SERVICE%20wikibase%3Alabel%20%7B%20%20%20%20%20%20%20%20%23%20Adds%20readable%20labels%0A%20%20%20%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%0A%20%20%20%7D%0A%7D Test SPARQL query]


== Welche Inszenierungen fanden in Theatergebäuden statt? ==
== Which productions took place in theatre buildings? ==
<syntaxhighlight lang="sparql" line="1">
PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>
 
SELECT ?inszenierung ?inszenierungLabel ?spielortLabel WHERE {
  ?inszenierung wdt:P3 wd:Q309.  # Production is a production [Q309] 
  ?inszenierung wdt:P8 ?spielort. # Production has a venue (e.g., a theatre) [P8]
  ?spielort wdt:P3 wd:Q239.      # Venue is a theatre/theatre building [Q239]
 
  SERVICE wikibase:label {        # Adds readable labels
    bd:serviceParam wikibase:language "en".
  }
}
 
</syntaxhighlight>Click here: [http://mtm.uni-trier.de/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fmtm.uni-trier.de%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fmtm.uni-trier.de%2Fentity%2F%3E%0A%0ASELECT%20%3Finszenierung%20%3FinszenierungLabel%20%3FspielortLabel%20WHERE%20%7B%0A%20%20%3Finszenierung%20wdt%3AP3%20wd%3AQ309.%20%20%20%23%20Production%20is%20a%20production%20%5BQ309%5D%20%20%0A%20%20%3Finszenierung%20wdt%3AP8%20%3Fspielort.%20%23%20Production%20has%20a%20venue%20%28e.g.%2C%20a%20theatre%29%20%5BP8%5D%0A%20%20%3Fspielort%20wdt%3AP3%20wd%3AQ239.%20%20%20%20%20%20%20%23%20Venue%20is%20a%20theatre%2Ftheatre%20building%20%5BQ239%5D%0A%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20%20%20%20%20%20%20%20%23%20Adds%20readable%20labels%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%0A%20%20%7D%0A%7D%0A Test SPARQL query]


== Which productions did not take place in theatre buildings? ==
== Which productions did not take place in theatre buildings? ==
<syntaxhighlight lang="sparql">
PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>
SELECT ?inszenierung ?inszenierungLabel ?spielortLabel WHERE {
  ?inszenierung wdt:P3 wd:Q309.  # Production is a production [Q309] 
  ?inszenierung wdt:P8 ?spielort. # Production has a venue [P8]
  MINUS {
    ?spielort wdt:P3 wd:Q239.    # Exclude productions that took place in a theatre/theatre building
  }
  SERVICE wikibase:label {        # Adds readable labels
    bd:serviceParam wikibase:language "en".
  }
}
</syntaxhighlight>Click here: [http://mtm.uni-trier.de/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fmtm.uni-trier.de%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fmtm.uni-trier.de%2Fentity%2F%3E%0A%0ASELECT%20%3Finszenierung%20%3FinszenierungLabel%20%3FspielortLabel%20WHERE%20%7B%0A%20%20%3Finszenierung%20wdt%3AP3%20wd%3AQ309.%20%20%20%23%20Production%20is%20a%20production%20%5BQ309%5D%20%20%0A%20%20%3Finszenierung%20wdt%3AP8%20%3Fspielort.%20%23%20Production%20has%20a%20venue%20%5BP8%5D%0A%20%20MINUS%20%7B%0A%20%20%20%20%3Fspielort%20wdt%3AP3%20wd%3AQ239.%20%20%20%20%20%23%20Exclude%20productions%20that%20took%20place%20in%20a%20theatre%2Ftheatre%20building%0A%20%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20%20%20%20%20%20%20%20%23%20Adds%20readable%20labels%0A%20%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%0A%20%20%7D%0A%7D%0A Test SPARQL query]


== What productions took place in courthouses? ==
== What productions took place in courthouses? ==
<syntaxhighlight lang="sparql" line="1">
PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>
SELECT ?inszenierung ?inszenierungLabel ?spielortLabel WHERE {
  ?inszenierung wdt:P3 wd:Q309.  # Production is a production [Q309] 
  ?inszenierung wdt:P8 ?spielort. # Production has a venue (e.g. a theatre) [P8]
  ?spielort wdt:P3 wd:Q240.      # Venue is a court [Q240]
  SERVICE wikibase:label {        # Adds readable labels
    bd:serviceParam wikibase:language "en".
  }
}
</syntaxhighlight>Click here: [http://mtm.uni-trier.de/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fmtm.uni-trier.de%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fmtm.uni-trier.de%2Fentity%2F%3E%0A%0ASELECT%20%3Finszenierung%20%3FinszenierungLabel%20%3FspielortLabel%20WHERE%20%7B%0A%20%20%3Finszenierung%20wdt%3AP3%20wd%3AQ309.%20%20%20%23%20Production%20is%20a%20production%20%5BQ309%5D%20%20%0A%20%20%3Finszenierung%20wdt%3AP8%20%3Fspielort.%20%23%20Production%20has%20a%20venue%20%28e.g.%20a%20theatre%29%20%5BP8%5D%0A%20%20%3Fspielort%20wdt%3AP3%20wd%3AQ240.%20%20%20%20%20%20%20%23%20Venue%20is%20a%20court%20%5BQ240%5D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20%20%20%20%20%20%20%20%23%20Adds%20readable%20labels%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%0A%20%20%7D%0A%7D%0A Test SPARQL query]

Revision as of 17:05, 28 November 2025

Back to the overview of all query topics: back

Pictures of the theatre buildings

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX mmd: <https://mtm.uni-trier.de/entity/> 
PREFIX mmdt: <https://mtm.uni-trier.de/prop/direct/>

#defaultView:ImageGrid

SELECT ?theatreBuildingLabel ?image WHERE {
    ?theatreBuilding mmdt:P3 mmd:Q239.  # Theatre building is an instance of Theatre Building (Q239)
    ?theatreBuilding mmdt:P2 ?WikiDataEntity. # Exact match to a Wikidata item
  
    SERVICE <https://query.wikidata.org/sparql> {
        ?WikiDataEntity wdt:P18 ?image.  # P18 = image in Wikidata
    }
  
    SERVICE wikibase:label {                          
        bd:serviceParam wikibase:language "en".  # Add readable labels in English
    }
}

Click here: Test SPARQL query

Which productions were staged in Berlin?

PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>

SELECT ?spielortLabel ?inszenierung ?inszenierungLabel WHERE {   
   ?inszenierung wdt:P3 wd:Q309.   # Production is an instance of Production (Q309)
   ?inszenierung wdt:P8 ?spielort. # Production has a venue (e.g., a theatre) (P8)
   ?spielort wdt:P21 wd:Q237.      # The venue is located in a place – in this case Berlin (Q237)
   
   SERVICE wikibase:label {        # Adds readable labels
       bd:serviceParam wikibase:language "en".
   }
}

Click here: Test SPARQL query

Which productions took place in theatre buildings?

PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>

SELECT ?inszenierung ?inszenierungLabel ?spielortLabel WHERE {
  ?inszenierung wdt:P3 wd:Q309.   # Production is a production [Q309]  
  ?inszenierung wdt:P8 ?spielort. # Production has a venue (e.g., a theatre) [P8]
  ?spielort wdt:P3 wd:Q239.       # Venue is a theatre/theatre building [Q239]

  SERVICE wikibase:label {        # Adds readable labels
    bd:serviceParam wikibase:language "en".
  }
}

Click here: Test SPARQL query

Which productions did not take place in theatre buildings?

PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>

SELECT ?inszenierung ?inszenierungLabel ?spielortLabel WHERE {
  ?inszenierung wdt:P3 wd:Q309.   # Production is a production [Q309]  
  ?inszenierung wdt:P8 ?spielort. # Production has a venue [P8]
  MINUS {
    ?spielort wdt:P3 wd:Q239.     # Exclude productions that took place in a theatre/theatre building
  }
  SERVICE wikibase:label {        # Adds readable labels
     bd:serviceParam wikibase:language "en".
  }
}

Click here: Test SPARQL query

What productions took place in courthouses?

PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>

SELECT ?inszenierung ?inszenierungLabel ?spielortLabel WHERE {
  ?inszenierung wdt:P3 wd:Q309.   # Production is a production [Q309]  
  ?inszenierung wdt:P8 ?spielort. # Production has a venue (e.g. a theatre) [P8]
  ?spielort wdt:P3 wd:Q240.       # Venue is a court [Q240]
  SERVICE wikibase:label {        # Adds readable labels
    bd:serviceParam wikibase:language "en".
  }
}

Click here: Test SPARQL query