query-5688e633bac12f656df3e230570404e8
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 ?item ?itemLabel ?forLabel ?year ?ethnic_groupLabel
{
?item p:P166 ?award_stm .
?award_stm ps:P166 wd:Q112035151 .
OPTIONAL { ?award_stm pq:P1686 ?for }
OPTIONAL
{
?award_stm pq:P585 ?date
BIND (YEAR(?date) AS ?year)
}
?item wdt:P172 ?ethnic_group .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?award_stm")
v4("?date")
v6("?ethnic_group")
v3("?for")
v1("?item"):::projected
v5("?year"):::projected
c8(["bd:serviceParam"]):::iri
c3(["wd:Q112035151"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:P166"--> v2
v2 --"p:statement/P166"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1686".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P585".-> v4
bind0[/"year-from-dateTime(?date)"/]
v4 --o bind0
bind0 --as--o v5
end
v1 --"p:direct/P172"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end