query-404cc5a689951906f5d3818bd9ea167e
Christian Ferrer
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 schema: <http://schema.org/>
#shows files that depict athletics competitors
#defaultView:ImageGrid
SELECT ?file ?image
WHERE
{
{
SELECT ?item
WHERE
{
SERVICE <https://query.wikidata.org/sparql>
{
?item wdt:P106 wd:Q11513337 .
}
}
} ?file wdt:P180 ?item .
?file schema:contentUrl ?url .
?file wdt:P6731 wd:Q63348040 .
BIND(IRI(CONCAT("http://commons.wikimedia.org/wiki/Special:FilePath/", wikibase:decodeUri(SUBSTR(STR(?url),53)))) AS ?image)
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?file"):::projected
v4("?image"):::projected
v1("?item")
v3("?url")
c7(["wd:Q63348040"]):::iri
c3(["wd:Q11513337"]):::iri
subgraph s1["https://query.wikidata.org/sparql"]
style s1 stroke-width:4px;
v1 --"wdt:P106"--> c3
end
v2 --"wdt:P180"--> v1
v2 --"schema:contentUrl"--> v3
v2 --"wdt:P6731"--> c7
bind0[/"concat('http://commons.wikimedia.org/wiki/Special:FilePath/',http://wikiba.se/ontology#decodeUri(substring(str(?url),'53^^xsd:integer')))"/]
v3 --o bind0
bind0 --as--o v4