query-2228750ebb783e9d8eff26cd842e4250

rq turtle/ttl

TODO 原始列表 按年所属国家当年统计得奖人数

Use at

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#>
#defaultView:LineChart
SELECT  ?year (COUNT(?human) AS ?TotalYearlyPrizeNumberByCountry) ?countryLabel  
#SELECT  ?year ?human ?countryLabel  
WHERE
{

{
  SELECT * 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)
                    #SERVICE wikibase:label { bd:serviceParam wikibase:language "zh,[AUTO_LANGUAGE],". }
    }
  LIMIT 10000
}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?year ?countryLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?TotalYearlyPrizeNumberByCountry") v2("?awardStatement") v4("?country") v3("?date") v1("?human"):::projected v5("?year"):::projected a1((" ")) c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q7191"]):::iri v1 --"p:P166"--> v2 v2 --"p:statement/P166"--> a1 a1 --"p:direct/P279"--> c4 v2 --"p:qualifier/P585"--> v3 v1 --"p:direct/P27"--> v4 bind0[/"str(year-from-dateTime(?date))"/] v3 --o bind0 bind0 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind2[/"count(?human)"/] v1 --o bind2 bind2 --as--o v6