query-015a98f46ab84321cae2d6630832a892

rq turtle/ttl

People who won the Nobel Prize more than once SELECT ?winnerLabel ?wins { { SELECT ?winner (COUNT(?prize) AS ?wins) WHERE
{ ?winner wdt:P31 wd:Q5 . # human ?winner wdt:P166 ?prize . # who has won some prize ?prize wdt:P31 wd:Q7191 . # and where that prize is a kind of Nobel prize } GROUP BY ?winner ORDER BY DESC(?wins) } FILTER( ?wins > 1) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# People who won the Nobel Prize more than once
SELECT ?winnerLabel ?wins
{
  {
    SELECT ?winner (COUNT(?prize) AS ?wins)
    WHERE  
    { 
      ?winner wdt:P31 wd:Q5 . # human
      ?winner wdt:P166 ?prize . # who has won some prize
      ?prize wdt:P31 wd:Q7191 . # and where that prize is a kind of Nobel prize
    }
    GROUP BY ?winner
    ORDER BY DESC(?wins)
  }
  FILTER( ?wins > 1)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?prize") v2("?winner") v4("?wins"):::projected c7(["bd:serviceParam"]):::iri c3(["wd:Q5"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c5(["wd:Q7191"]):::iri f0[["?wins > '1^^xsd:integer'"]] f0 --> v4 v2 --"wdt:P31"--> c3 v2 --"wdt:P166"--> v3 v3 --"wdt:P31"--> c5 bind2[/"count(?prize)"/] v3 --o bind2 bind2 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end