query-a918a2b7952ec63095a2c9ad750eeb3d

rq turtle/ttl

title: List of all winners SELECT ?item ?itemLabel ?date ?winner ?winnerLabel ?country ?countryLabel WHERE { ?item wdt:P361 wd:Q61778309; rdfs:label ?itemLabel. FILTER((LANG(?itemLabel)) = "[AUTO_LANGUAGE]") ?item wdt:P585 ?date. ?item p:P1346 ?statement. ?statement ps:P1346 ?winner. ?statement pq:P642 wd:Q20882747 . ?winner rdfs:label ?winnerLabel. FILTER((LANG(?winnerLabel)) = "[AUTO_LANGUAGE]" ) ?winner wdt:P27 ?country. ?country rdfs:label ?countryLabel. FILTER((LANG(?countryLabel)) = "[AUTO_LANGUAGE]" )

} ORDER BY ?date

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
#title: List of all winners
SELECT ?item ?itemLabel ?date ?winner ?winnerLabel ?country ?countryLabel WHERE {
  ?item wdt:P361 wd:Q61778309;
    rdfs:label ?itemLabel.
  FILTER((LANG(?itemLabel)) = "[AUTO_LANGUAGE]")
  ?item wdt:P585 ?date. 
  ?item p:P1346 ?statement.
  ?statement ps:P1346 ?winner.
  ?statement pq:P642 wd:Q20882747 .
  ?winner rdfs:label ?winnerLabel.
  FILTER((LANG(?winnerLabel)) = "[AUTO_LANGUAGE]" )
  ?winner wdt:P27 ?country.
  ?country rdfs:label ?countryLabel.
  FILTER((LANG(?countryLabel)) = "[AUTO_LANGUAGE]" )

}
ORDER BY ?date

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?country"):::projected v2("?countryLabel"):::projected v1("?date"):::projected v5("?item"):::projected v4("?itemLabel"):::projected v6("?statement") v7("?winner"):::projected v3("?winnerLabel"):::projected c3(["wd:Q61778309"]):::iri c9(["wd:Q20882747"]):::iri f0[["?countryLabel = '#91;AUTO_LANGUAGE#93;'"]] f0 --> v2 f1[["?winnerLabel = '#91;AUTO_LANGUAGE#93;'"]] f1 --> v3 f2[["?itemLabel = '#91;AUTO_LANGUAGE#93;'"]] f2 --> v4 v5 --"p:direct/P361"--> c3 v5 --"rdfs:label"--> v4 v5 --"p:direct/P585"--> v1 v5 --"p:P1346"--> v6 v6 --"p:statement/P1346"--> v7 v6 --"p:qualifier/P642"--> c9 v7 --"rdfs:label"--> v3 v7 --"p:direct/P27"--> v8 v8 --"rdfs:label"--> v2