query-dfcfc99e076261116ec66adc398a6b24

rq turtle/ttl

Which justices on the Supreme Court of Sweden (Q741421) dissent most often?Animated bar chart.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Dissenting justices on the Supreme Court of Sweden
#defaultView:BarChart
SELECT ?justiceLabel (count(?case) as ?num) ?opLabel ?year WHERE {
  ?case wdt:P31 wd:Q96482904;
        wdt:P577 ?date;
        p:P527 [ps:P527 ?op;
                pq:P7122 ?justice].
  BIND ( str(year(?date)) as ?year )
  FILTER ( ?op = wd:Q1087840 || ?op = wd:Q1092720 || ?op = wd:Q6738447 ).
  SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
}
GROUP BY ?justice ?justiceLabel ?opLabel ?year

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?case"):::projected v3("?date") v4("?justice") v6("?num") v1("?op") v5("?year"):::projected a1((" ")) c5(["wd:Q96482904"]):::iri c11(["bd:serviceParam"]):::iri c13(["sv,en"]):::literal f0[["(?op = 'wd:Q1087840' || (?op = 'wd:Q1092720' || ?op = 'wd:Q6738447'))"]] f0 --> v1 v2 --"p:direct/P31"--> c5 v2 --"p:direct/P577"--> v3 a1 --"p:statement/P527"--> v1 a1 --"p:qualifier/P7122"--> v4 v2 --"p:P527"--> a1 bind1[/"str(year-from-dateTime(?date))"/] v3 --o bind1 bind1 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end bind3[/"count(?case)"/] v2 --o bind3 bind3 --as--o v6