query-a0f889fef4d09d28c8985faa07df51f0
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#>
#defaultView:Timeline{"hide": "?date"}
SELECT (SAMPLE(?im) AS ?image) ?womanwinner ?womanwinnerLabel ?date (YEAR(?date) AS ?year) ?priceLabel WHERE {
?womanwinner wdt:P21 wd:Q6581072; p:P166 [ ps:P166 ?price; pq:P585 ?date ].
?price (wdt:P79|wdt:P361)* wd:Q7191 .
OPTIONAL { ?womanwinner wdt:P18 ?p18 }
BIND(IF(BOUND(?p18),?p18,URI("http://commons.wikimedia.org/wiki/Special:FilePath/Head_silhouette.svg")) AS ?im)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?womanwinner ?womanwinnerLabel ?date ?priceLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?date"):::projected
v5("?im"):::projected
v6("?image")
v4("?p18")
v2("?price")
v1("?womanwinner"):::projected
v7("?year")
a1((" "))
c2(["wd:Q6581072"]):::iri
c7(["wd:Q7191"]):::iri
c11(["bd:serviceParam"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:direct/P21"--> c2
a1 --"p:statement/P166"--> v2
a1 --"p:qualifier/P585"--> v3
v1 --"p:P166"--> a1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P361"--> c7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P79"--> c7
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P18".-> v4
end
bind0[/"if(bound(?p18),?p18,'http://commons.wikimedia.org/wiki/Special:FilePath/Head_silhouette.svg')"/]
v4 --o bind0
bind0 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind2[/"sample(?im)"/]
v5 --o bind2
bind2 --as--o v6
bind3[/"year-from-dateTime(?date)"/]
v3 --o bind3
bind3 --as--o v7