query-1d9399b0114ab8dfe0e01a48f0cb0493
Gallery of MPs who have won a Nobel Prize
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 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#>
#MPs with Nobels
SELECT DISTINCT ?personLabel ?person ?awardLabel ?year ?image WHERE {
?person p:P166 ?statement . # this person had won some kind of award
?statement ps:P166 ?award . ?award wdt:P31/wdt:P279* wd:Q7191 . # and that award is a Nobel
optional { ?statement pq:P585 ?time . bind(year(?time) as ?year) . }
?person wdt:P39 [ wdt:P279* wd:Q16707842 ] .
optional { ?person wdt:P18 ?image . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
} order by ?year
#defaultView:ImageGrid
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?award")
v6("?image"):::projected
v2("?person"):::projected
v3("?statement")
v5("?time")
v6("?year"):::projected
a1((" "))
a2((" "))
c7(["wd:Q16707842"]):::iri
c13(["en"]):::literal
c5(["wd:Q7191"]):::iri
c11(["bd:serviceParam"]):::iri
v2 --"p:P166"--> v3
v3 --"p:statement/P166"--> v4
v4 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P585".-> v5
bind0[/"year-from-dateTime(?time)"/]
v5 --o bind0
bind0 --as--o v6
end
a2 --"p:direct/P279"--> c7
v2 --"p:direct/P39"--> a2
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P18".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end