query-b5513546ba7db23e118c4a9fe0978b7e

rq turtle/ttl

Picture gallery of images depicting a outdoor gym in this project Project Outdoor Gyms (Q107186275)

Use at

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/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Outdoor Gyms with pictures in Wikidata
#defaultView:ImageGrid{"hide":["?image "]}
SELECT DISTINCT ?itemLabel ?image ?www

WHERE 
{  
{ SELECT ?item ?itemLabel ?itemDescription ?www WHERE
  { SERVICE <https://query.wikidata.org/sparql> 
    {?item  wdt:P6104 wd:Q107186275.
     OPTIONAL {?item wdt:P856 ?www}
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en,sv". ?item rdfs:label ?itemLabel .}
    }
  }
}.
  ?file wdt:P180 ?item.
  ?file schema:contentUrl ?url. 
  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; v4("?file") v6("?image"):::projected v1("?item") v3("?itemLabel"):::projected v5("?url") v2("?www"):::projected c6(["bd:serviceParam"]):::iri c8(["en,sv"]):::literal c3(["wd:Q107186275"]):::iri subgraph s1["https://query.wikidata.org/sparql"] style s1 stroke-width:4px; v1 --"wdt:P6104"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P856".-> v2 end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c6 --"wikibase:language"--> c8 v1 --"rdfs:label"--> v3 end end v4 --"wdt:P180"--> v1 v4 --"schema:contentUrl"--> v5 bind0[/"concat('http://commons.wikimedia.org/wiki/Special:FilePath/',http://wikiba.se/ontology#decodeUri(substring(str(?url),'53^^xsd:integer')))"/] v5 --o bind0 bind0 --as--o v6