query-89b909fea4b09fefa6a5723e4ea992cf

rq turtle/ttl

Ashmolean items for a given material

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
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 ?inventory (GROUP_CONCAT(?typeLabel; separator=", ") AS ?types) (YEAR(?earliest) AS ?from) (YEAR(?latest) AS ?to) WHERE {
?item p:P195 [ps:P195 wd:Q636400; pq:P217 ?inventory].
?item wdt:P186 wd:Q37681; wdt:P31 ?type;
wdt:P973 ?url FILTER (STRSTARTS(STR(?url),"http://jameelcentre") ).
OPTIONAL {?item p:P571 [pq:P1319 ?earliest; pq:P1326 ?latest] }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en".
?item rdfs:label ?itemLabel. ?type rdfs:label ?typeLabel}
} GROUP BY ?item ?itemLabel ?inventory ?earliest ?latest
ORDER BY ?from ?to ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?earliest"):::projected v12("?from") v5("?inventory"):::projected v6("?item"):::projected v3("?itemLabel"):::projected v9("?latest"):::projected v12("?to") v7("?type") v10("?typeLabel"):::projected v11("?types") v4("?url") a1((" ")) a2((" ")) c16(["en"]):::literal c14(["bd:serviceParam"]):::iri c7(["wd:Q37681"]):::iri c3(["wd:Q636400"]):::iri f0[["starts-with(str(?url),'http://jameelcentre')"]] f0 --> v4 a1 --"p:statement/P195"--> c3 a1 --"p:qualifier/P217"--> v5 v6 --"p:P195"--> a1 v6 --"p:direct/P186"--> c7 v6 --"p:direct/P31"--> v7 v6 --"p:direct/P973"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; a2 -."p:qualifier/P1319".-> v8 a2 --"p:qualifier/P1326"--> v9 v6 --"p:P571"--> a2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 v6 --"rdfs:label"--> v3 v7 --"rdfs:label"--> v10 end bind2[/"?typeLabel"/] v10 --o bind2 bind2 --as--o v11 bind3[/"year-from-dateTime(?earliest)"/] v8 --o bind3 bind3 --as--o v12 bind4[/"year-from-dateTime(?latest)"/] v9 --o bind4 bind4 --as--o v12