query-bd29c82cfa06ee9b8a7dc0542b571494

rq turtle/ttl

13:45, 7 February 2018 (UTC)) talk (LoominadeI want only the first. how? --13:52, 7 February 2018 (UTC) (talk) Sjoerd de BruinSet one of them to prefered on Wikidata itself. Otherwise there is no reason to have multiple image statements. You may want to use SAMPLE (note that this needs also the line with GROUP BY to work). It's not the first image, but a random one. See my similar thread and same problem above.

Use at

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#>
#defaultView:Timeline

SELECT ?Chaos_Communication_Camp ?Chaos_Communication_CampLabel ?start_time (SAMPLE(?image) as ?image) WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?Chaos_Communication_Camp wdt:P361 wd:Q450487.
  OPTIONAL { ?Chaos_Communication_Camp wdt:P580 ?start_time. }
  OPTIONAL { ?Chaos_Communication_Camp wdt:P18 ?image. }
}
GROUP BY ?Chaos_Communication_Camp ?Chaos_Communication_CampLabel ?start_time

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?Chaos_Communication_Camp"):::projected v4("?image"):::projected v2("?start_time"):::projected c6(["wd:Q450487"]):::iri c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"wdt:P361"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P580".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v4 end bind1[/"sample(?image)"/] v4 --o bind1 bind1 --as--o v4