Information about venues

From MtM

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 ?venueLabel ?production ?productionLabel WHERE {   
   ?production wdt:P3 wd:Q309.    # Production is an instance of Production (Q309)
   ?production wdt:P8 ?venue.     # Production has a venue (e.g., a theatre) (P8)
   ?venue 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 ?production ?productionLabel ?venueLabel WHERE {
  ?production wdt:P3 wd:Q309.   # Production is a production [Q309]
  ?production wdt:P8 ?venue.    # Production has a venue (e.g., a theatre) [P8]
  ?venue 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 ?production ?productionLabel ?venueLabel WHERE {
  ?production wdt:P3 wd:Q309.   # Production is a production [Q309]  
  ?production wdt:P8 ?venue.    # Production has a venue [P8]
  MINUS {
    ?venue 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 ?production ?productionLabel ?venueLabel WHERE {
  ?production wdt:P3 wd:Q309.   # Production is a production [Q309]  
  ?production wdt:P8 ?venue.    # Production has a venue (e.g., a theatre) [P8]
  ?venue 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