query-e9eb49382664f4986099fb681da411b2
TODO
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 ?awardLabel (YEAR(?p585) AS ?year) ?literary_work ?literary_workLabel ?authorLabel WHERE {
{
SELECT ?literary_work ?award ?author ?p585 WHERE {
?award wdt:P31/wdt:P279* wd:Q378427 .
?award wdt:P17 wd:Q38 .
?literary_work p:P166 ?p166stm .
?p166stm ps:P166 ?award .
OPTIONAL { ?p166stm pq:P585 ?p585 }
OPTIONAL { ?literary_work wdt:P50 ?author }
}
} ?literary_work wdt:P31/wdt:P279* wd:Q386724 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
ORDER BY ?awardLabel ?year ?STR(?literary_workLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?STR")
v9("?author")
v5("?award")
v1("?awardLabel"):::projected
v6("?literary_work"):::projected
v4("?literary_workLabel"):::projected
v7("?p166stm")
v8("?p585"):::projected
v10("?year")
a1((" "))
a2((" "))
c3(["wd:Q378427"]):::iri
c5(["wd:Q38"]):::iri
c12(["bd:serviceParam"]):::iri
c10(["wd:Q386724"]):::iri
c14(["it,en"]):::literal
v5 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
v5 --"p:direct/P17"--> c5
v6 --"p:P166"--> v7
v7 --"p:statement/P166"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v7 -."p:qualifier/P585".-> v8
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v6 -."p:direct/P50".-> v9
end
v6 --"p:direct/P31"--> a2
a2 --"p:direct/P279"--> c10
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end
bind0[/"year-from-dateTime(?p585)"/]
v8 --o bind0
bind0 --as--o v10