query-916bc7c9ddf84ccd2b0a53dc03edbb63
Swedish recipients SELECT DISTINCT ?year_received (GROUP_CONCAT(DISTINCT ?itemLabel; SEPARATOR = ", ") AS ?swedish_recipients) WHERE { ?item wdt:P27 wd:Q34; p:P166 ?prize. ?prize ps:P166 wd:Q1233326; pq:P585 ?date_received. BIND(YEAR(?date_received) AS ?year_received) SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,de,es". ?item rdfs:label ?itemLabel. } } GROUP BY ?year_received ORDER BY (?year_received)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
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/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Swedish recipients
SELECT DISTINCT ?year_received (GROUP_CONCAT(DISTINCT ?itemLabel; SEPARATOR = ", ") AS ?swedish_recipients)
WHERE {
?item wdt:P27 wd:Q34;
p:P166 ?prize.
?prize ps:P166 wd:Q1233326;
pq:P585 ?date_received.
BIND(YEAR(?date_received) AS ?year_received)
SERVICE wikibase:label {
bd:serviceParam wikibase:language "fr,en,de,es".
?item rdfs:label ?itemLabel.
}
}
GROUP BY ?year_received
ORDER BY (?year_received)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?date_received")
v2("?item")
v5("?itemLabel"):::projected
v3("?prize")
v6("?swedish_recipients")
v5("?year_received"):::projected
c8(["bd:serviceParam"]):::iri
c5(["wd:Q1233326"]):::iri
c10(["fr,en,de,es"]):::literal
c2(["wd:Q34"]):::iri
v2 --"p:direct/P27"--> c2
v2 --"p:P166"--> v3
v3 --"p:statement/P166"--> c5
v3 --"p:qualifier/P585"--> v4
bind0[/"year-from-dateTime(?date_received)"/]
v4 --o bind0
bind0 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
v2 --"rdfs:label"--> v5
end
bind2[/"?itemLabel"/]
v5 --o bind2
bind2 --as--o v6