query-6b98d75aee11b12114aadfb2f0ae17b4
Gallery of people depicted in works of public art in Boston neighborhoods
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#>
#title: People depicted in works of public art in Boston neighborhoods, by number of works
#defaultView:ImageGrid
select ?depictedPerson ?depictedPersonLabel (sample(?image) as ?personImage) (count(distinct ?work) as ?numberOfWorks) where {
?work wdt:P5008 wd:Q108040915;
wdt:P136 wd:Q557141;
wdt:P180 ?depictedPerson.
?depictedPerson wdt:P31 wd:Q5.
optional{?depictedPerson wdt:P18 ?image.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?depictedPerson ?depictedPersonLabel
order by desc(?numberOfWorks)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?depictedPerson"):::projected
v4("?image"):::projected
v6("?numberOfWorks")
v5("?personImage")
v2("?work"):::projected
c10(["bd:serviceParam"]):::iri
c2(["wd:Q108040915"]):::iri
c4(["wd:Q557141"]):::iri
c7(["wd:Q5"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P5008"--> c2
v2 --"wdt:P136"--> c4
v2 --"wdt:P180"--> v3
v3 --"wdt:P31"--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P18".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind2[/"sample(?image)"/]
v4 --o bind2
bind2 --as--o v5
bind3[/"count(?work)"/]
v2 --o bind3
bind3 --as--o v6