query-566a3160e5c10027e06cc09f5936b548
Ashmolean people associated with a given location or era
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?person ?personLabel ?personDescription (SAMPLE(?image) AS ?img) (YEAR(SAMPLE(?time)) AS ?year) WHERE {
?item wdt:P195 wd:Q636400; wdt:P973 ?url FILTER (STRSTARTS(STR(?url), "http://jameelcentre") ).
?item ?prop ?person.
?person wdt:P31 wd:Q5.
?person ?prop2 wd:Q1490.
OPTIONAL {?person wdt:P18 ?image}
OPTIONAL {?person wdt:P569 ?birth}
OPTIONAL {?person wdt:P1317 ?fl}
OPTIONAL {?person wdt:P2348/wdt:P580 ?erastart}
BIND(IF(BOUND(?birth), ?birth, IF(BOUND(?fl), ?fl, ?erastart) ) AS ?time).
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"}
} GROUP BY ?person ?personLabel ?personDescription ORDER BY ?year
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?birth")
v10("?erastart")
v9("?fl")
v7("?image"):::projected
v12("?img")
v3("?item")
v5("?person"):::projected
v4("?prop")
v6("?prop2")
v11("?time")
v2("?url")
v13("?year")
a1((" "))
c14(["bd:serviceParam"]):::iri
c7(["wd:Q1490"]):::iri
c6(["wd:Q5"]):::iri
c3(["wd:Q636400"]):::iri
c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["starts-with(str(?url),'http://jameelcentre')"]]
f0 --> v2
v3 --"wdt:P195"--> c3
v3 --"wdt:P973"--> v2
v3 -->v4--> v5
v5 --"wdt:P31"--> c6
v5 -->v6--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P18".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P569".-> v8
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P1317".-> v9
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P2348".-> a1
a1 --"wdt:P580"--> v10
end
bind1[/"if(bound(?birth),?birth,if(bound(?fl),?fl,?erastart))"/]
v8 --o bind1
v9 --o bind1
v10 --o bind1
bind1 --as--o v11
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
end
bind4[/"sample(?image)"/]
v7 --o bind4
bind4 --as--o v12
bind5[/"year-from-dateTime()"/]
null --o bind5
bind5 --as--o v13