query-69161b2b1429c7d12ea7dce1ef728250
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 ?award ?awardLabel ?year ?winner ?winnerLabel ?work ?workLabel WHERE {
?award wdt:P31/wdt:P279* wd:Q378427 .
?award wdt:P17 wd:Q38 .
?award ^ps:P166 ?statement .
?statement ^p:P166 ?winner .
?winner wdt:P31 wd:Q5 .
OPTIONAL{?statement pq:P1686 ?work .}
OPTIONAL{?statement pq:P585 ?point_in_time .
BIND(YEAR(?point_in_time) AS ?year)}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en" .}
BIND(xsd:integer(SUBSTR(STR(?award),33,99)) AS ?qid)
} ORDER BY ASC(?qid) DESC(?year)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?award"):::projected
v7("?point_in_time")
v8("?qid")
v4("?statement")
v5("?winner"):::projected
v6("?work"):::projected
v8("?year"):::projected
a1((" "))
c14(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal
c3(["wd:Q378427"]):::iri
c5(["wd:Q38"]):::iri
c12(["bd:serviceParam"]):::iri
c8(["wd:Q5"]):::iri
v3 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
v3 --"p:direct/P17"--> c5
v4 --"p:statement/P166"--> v3
v5 --"p:P166"--> v4
v5 --"p:direct/P31"--> c8
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P1686".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P585".-> v7
bind0[/"year-from-dateTime(?point_in_time)"/]
v7 --o bind0
bind0 --as--o v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end
bind1[/"http://www.w3.org/2001/XMLSchema#integer(substring(str(?award),'33^^xsd:integer','99^^xsd:integer'))"/]
v3 --o bind1
bind1 --as--o v8