Locations

From MtM

Back to the overview of all query topics: back

In which productions does the setting differ from that of the literary source material?

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

SELECT ?production ?productionLabel ?venueProdLabel ?venueSourceLabel WHERE {
  ?production wdt:P3 wd:Q309.
  ?production wdt:P9 ?venueProd.        # Venue in production
  ?production wdt:P4 ?source.           # Literary source
  ?source wdt:P9 ?venueSource.          # Venue in literary source

  FILTER (?venueProd != ?venueSource)

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en".
  }
}

Click here: Test SPARQL query

What settings are there in the productions listed here?

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

SELECT ?production ?productionLabel ?venue ?venueLabel WHERE {
  ?production wdt:P3 wd:Q309.
  ?production wdt:P9 ?venue.

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en".
  }
}

Click here: Test SPARQL query

Which productions did (not) have a courtroom as their setting?

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 wdt:P9 ?venue.
  FILTER (?venue != wd:Q7)   # Q7: courtroom

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en".
  }
}

In line 10: To display productions that took place in a courtroom: Remove the exclamation mark. FILTER (?location = wd:Q7)

Click here: Test SPARQL query