query-d681fa715f07afe17a8190623dd96bb2

rq turtle/ttl

People associated with Ashmolean items

Use at

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) (COUNT(?item) AS ?count) (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.
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 "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; v7("?birth") v12("?count") v9("?erastart") v8("?fl") v6("?image"):::projected v11("?img") v3("?item"):::projected v5("?person"):::projected v4("?prop") v10("?time") v2("?url") v13("?year") a1((" ")) c15(["en"]):::literal c13(["bd:serviceParam"]):::iri c6(["wd:Q5"]):::iri c3(["wd:Q636400"]):::iri f0[["starts-with(str(?url),'http://jameelcentre')"]] f0 --> v2 v3 --"wdt:P195"--> c3 v3 --"wdt:P973"--> v2 v3 -->v4--> v5 v5 --"wdt:P31"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P18".-> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P569".-> v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P1317".-> v8 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P2348".-> a1 a1 --"wdt:P580"--> v9 end bind1[/"if(bound(?birth),?birth,if(bound(?fl),?fl,?erastart))"/] v7 --o bind1 v8 --o bind1 v9 --o bind1 bind1 --as--o v10 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end bind5[/"sample(?image)"/] v6 --o bind5 bind5 --as--o v11 bind6[/"count(?item)"/] v3 --o bind6 bind6 --as--o v12 bind7[/"year-from-dateTime()"/] null --o bind7 bind7 --as--o v13