query-bb5503c7beb1bfb678602fc8f5bdfa11
按年所属国家累计年统计得奖人数
Use at
- https://query.wikidata.org/sparql
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/>
SELECT *
WHERE {
{
SELECT ?year ?country ?human ?yearOther ?countryOther ?humanOther WHERE {
?human (p:P166) ?awardStatement.
?awardStatement ps:P166/wdt:P279* wd:Q7191.
?awardStatement pq:P585 ?date.
?human wdt:P27 ?country.
bind(str(YEAR(?date)) AS ?year)
?humanOther (p:P166) ?awardStatement.
?awardStatement ps:P166/wdt:P279* wd:Q7191.
?awardStatement pq:P585 ?date.
?humanOther wdt:P27 ?countryOther.
bind(str(YEAR(?date)) AS ?yearOther)
FILTER (?year >= ?yearOther)
}
}
}
#GROUP BY ?year
ORDER BY ASC(?year)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?awardStatement")
v6("?country"):::projected
v8("?countryOther"):::projected
v5("?date")
v3("?human"):::projected
v7("?humanOther"):::projected
v7("?year"):::projected
v9("?yearOther"):::projected
a1((" "))
a2((" "))
c4(["wd:Q7191"]):::iri
f0[["?year >= ?yearOther"]]
f0 --> v7
f0 --> v9
v3 --"p:P166"--> v4
v4 --"p:statement/P166"--> a1
a1 --"p:direct/P279"--> c4
v4 --"p:qualifier/P585"--> v5
v3 --"p:direct/P27"--> v6
bind1[/"str(year-from-dateTime(?date))"/]
v5 --o bind1
bind1 --as--o v7
v7 --"p:P166"--> v4
v4 --"p:statement/P166"--> a2
a2 --"p:direct/P279"--> c4
v4 --"p:qualifier/P585"--> v5
v7 --"p:direct/P27"--> v8
bind2[/"str(year-from-dateTime(?date))"/]
v5 --o bind2
bind2 --as--o v9