Locations: Difference between revisions

From MtM
(Created page with "Back to the overview of all query topics: back")
 
No edit summary
 
Line 1: Line 1:
Back to the overview of all query topics: [[SPARQL-Queries|back]]
Back to the overview of all query topics: [[SPARQL-Queries|back]]
== In which productions does the setting differ from that of the literary source material? ==
<syntaxhighlight lang="sparql" line="1">
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".
  }
}
</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%3Fproduction%20%3FproductionLabel%20%3FvenueProdLabel%20%3FvenueSourceLabel%20WHERE%20%7B%0A%20%20%3Fproduction%20wdt%3AP3%20wd%3AQ309.%0A%20%20%3Fproduction%20wdt%3AP9%20%3FvenueProd.%20%20%20%20%20%20%20%20%23%20Venue%20in%20production%0A%20%20%3Fproduction%20wdt%3AP4%20%3Fsource.%20%20%20%20%20%20%20%20%20%20%20%23%20Literary%20source%0A%20%20%3Fsource%20wdt%3AP9%20%3FvenueSource.%20%20%20%20%20%20%20%20%20%20%23%20Venue%20in%20literary%20source%0A%0A%20%20FILTER%20%28%3FvenueProd%20%21%3D%20%3FvenueSource%29%0A%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%0A%20%20%7D%0A%7D%0A Test SPARQL query]
== What settings are there in the productions listed here? ==
<syntaxhighlight lang="sparql" line="1">
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".
  }
}
</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%3Fproduction%20%3FproductionLabel%20%3Fvenue%20%3FvenueLabel%20WHERE%20%7B%0A%20%20%3Fproduction%20wdt%3AP3%20wd%3AQ309.%0A%20%20%3Fproduction%20wdt%3AP9%20%3Fvenue.%0A%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%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) have a courtroom as their setting? ==
<syntaxhighlight lang="sparql" line="1">
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".
  }
}
</syntaxhighlight>In line 10: To display productions that took place in a courtroom: Remove the exclamation mark. FILTER (?location = wd:Q7)
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%3Fproduction%20%3FproductionLabel%20%3FvenueLabel%20WHERE%20%7B%0A%20%20%3Fproduction%20wdt%3AP3%20wd%3AQ309.%0A%20%20%3Fproduction%20wdt%3AP9%20%3Fvenue.%0A%20%20FILTER%20%28%3Fvenue%20%21%3D%20wd%3AQ7%29%20%20%20%23%20Q7%3A%20courtroom%0A%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%0A%20%20%7D%0A%7D%0A Test SPARQL query]

Latest revision as of 20:54, 3 December 2025

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