query-ed4ffa11fef3b80cf72d21fb01548735
Items of a given type
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 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 (YEAR(?earliest) AS ?from) (YEAR(?latest) AS ?to) WHERE {
?item p:P195 [ps:P195 wd:Q636400; pq:P217 ?inventory].
?item wdt:P31 wd:Q1066288; 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 }
} ORDER BY ?from ?to ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?earliest"):::projected
v9("?from")
v5("?inventory"):::projected
v6("?item"):::projected
v3("?itemLabel"):::projected
v8("?latest"):::projected
v9("?to")
v4("?url")
a1((" "))
a2((" "))
c7(["wd:Q1066288"]):::iri
c15(["en"]):::literal
c13(["bd:serviceParam"]):::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/P31"--> c7
v6 --"p:direct/P973"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a2 -."p:qualifier/P1319".-> v7
a2 --"p:qualifier/P1326"--> v8
v6 --"p:P571"--> a2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
v6 --"rdfs:label"--> v3
end
bind1[/"year-from-dateTime(?earliest)"/]
v7 --o bind1
bind1 --as--o v9
bind2[/"year-from-dateTime(?latest)"/]
v8 --o bind2
bind2 --as--o v9