query-ccd746792280d374c001c481624ee937
title:Things depicted in the Jami' al-Tawarikh of Rashid al-Din SELECT ?part ?partLabel ?inv (GROUP_CONCAT(?label; separator=", ") AS ?depicted) WHERE { ?part wdt:P361 wd:Q107663668; wdt:P217 ?inv OPTIONAL{?part wdt:P180 ?thing. ?thing rdfs:label ?label FILTER(lang(?label)="en")} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?part ?partLabel ?inv ORDER BY UCASE(?inv)
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 bd: <http://www.bigdata.com/rdf#>
#title:Things depicted in the Jami' al-Tawarikh of Rashid al-Din
SELECT ?part ?partLabel ?inv (GROUP_CONCAT(?label; separator=", ") AS ?depicted)
WHERE {
?part wdt:P361 wd:Q107663668; wdt:P217 ?inv
OPTIONAL{?part wdt:P180 ?thing. ?thing rdfs:label ?label FILTER(lang(?label)="en")}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?part ?partLabel ?inv
ORDER BY UCASE(?inv)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?depicted")
v1("?inv"):::projected
v2("?label"):::projected
v3("?part"):::projected
v4("?thing")
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q107663668"]):::iri
v3 --"wdt:P361"--> c3
v3 --"wdt:P217"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P180".-> v4
v4 --"rdfs:label"--> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind1[/"?label"/]
v2 --o bind1
bind1 --as--o v5