query-f2febbc86919338404fd42d16dd9f724
Propertiesinstance of (P31)subclass of (P279)award received (P166)point in time (P585)
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#>
SELECT DISTINCT ?person ?personLabel ?award ?awardLabel ?year WHERE {
?person p:P166 ?statement.
?statement ps:P166 ?award.
?award wdt:P31 wd:Q17701409
OPTIONAL { ?statement pq:P585 ?date. BIND(YEAR(?date) AS ?year) }
MINUS{ ?person wdt:P31/wdt:P279? wd:Q15632617 } # exclude fictional people
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" }
} ORDER BY ASC(?awardLabel) ASC(?year)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?award"):::projected
v1("?awardLabel"):::projected
v6("?date")
v3("?person"):::projected
v4("?statement")
v7("?year"):::projected
a1((" "))
c4(["wd:Q17701409"]):::iri
c9(["bd:serviceParam"]):::iri
c6(["wd:Q15632617"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
v3 --"p:P166"--> v4
v4 --"p:statement/P166"--> v5
v5 --"p:direct/P31"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P585".-> v6
bind0[/"year-from-dateTime(?date)"/]
v6 --o bind0
bind0 --as--o v7
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v3 --"p:direct/P31"--> a1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
a1 --"p:direct/P279"--> c6
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
end
union0r <== or ==> union0l
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end