Voting

From MtM

Back to the overview of all query topics: back

List of productions and their voting methods and voting results

PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>
PREFIX p: <https://mtm.uni-trier.de/prop/>
PREFIX ps: <https://mtm.uni-trier.de/prop/statement/>
PREFIX pq: <https://mtm.uni-trier.de/prop/qualifier/>

SELECT DISTINCT ?production ?productionLabel ?venueLabel ?voteTypeLabel ?count ?verdictLabel WHERE {
  ?production wdt:P83 ?interactionElement.
  ?production wdt:P8 ?venue.
  ?interactionElement wdt:P84 ?voteType.

  ?interactionElement p:P93 ?statement.
  ?statement ps:P93 ?verdict.
  ?statement pq:P57 ?count.

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en".
  }
}
ORDER BY ?venue

Click here: Test SPARQL query

Which is the most frequently chosen voting method 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 ?voteTypeLabel (COUNT(?interactionElement) AS ?occurrences) WHERE {
  ?production wdt:P83 ?interactionElement.
  ?interactionElement wdt:P84 ?voteType.

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en".
  }
}
GROUP BY ?production ?productionLabel ?voteType ?voteTypeLabel
HAVING (COUNT(?interactionElement))

Click here: Test SPARQL query

How visible were the votes in the respective productions? And which voting method was chosen?

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

SELECT ?production ?productionLabel ?voteTypeLabel ?visibilityLabel WHERE {
  ?production wdt:P83 ?interactionElement.
  ?interactionElement wdt:P85 ?visibility.
  ?interactionElement wdt:P84 ?voteType.

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

Click here: Test SPARQL query

Which productions had invisible voting?

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

SELECT ?production ?productionLabel WHERE {
  ?production wdt:P83 ?interactionElement.
  ?interactionElement wdt:P85 wd:Q235.   # not visible

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

In line 6: for a non-visible vote: wd:Q235, for a visible vote: wd:Q234, and for a partially visible vote: wd:Q236.

Click here: Test SPARQL query