query-7acd3477bd598b768461e7a0f69f734e

rq turtle/ttl

Tunnels in Faroe islandsHello, I have two problems with this query, may someone help me clean up ? ?islelabel and ?instancelabel do not show + I would like to group_concat islands (there may be 2 islands connected by the tunnel)

Use at

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#>
SELECT ?item ?label ?instance ?instancelabel ?year ?height ?length ?islelabel
#?iles
WHERE {
  ?item (wdt:P31/wdt:P279*) wd:Q44377.
  ?item wdt:P17 wd:Q4628.
  OPTIONAL { ?item wdt:P31 ?instance. }
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "fr,en,fo,dk".
    ?item rdfs:label ?label.
  }
  OPTIONAL { ?item wdt:P580 ?annee_debut_0. }
  OPTIONAL { ?item wdt:P571 ?annee_debut_1. }
  OPTIONAL { ?item wdt:P1619 ?annee_debut_2. }
  BIND(COALESCE(STR(YEAR(?annee_debut_2)), STR(YEAR(?annee_debut_1)), STR(YEAR(?annee_debut_0))) AS ?year)
  OPTIONAL { ?item wdt:P2048 ?height. }
  OPTIONAL { ?item wdt:P2043 ?length. }
  OPTIONAL { ?item wdt:P5130 ?isle. }
  #GROUP_CONCAT(DISTINCT ?isleĀ ; separator='//') AS ?isles)
}
#GROUP BY ?item ?label
LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?annee_debut_0") v5("?annee_debut_1") v6("?annee_debut_2") v8("?height"):::projected v2("?instance"):::projected v10("?isle") v1("?item"):::projected v3("?label"):::projected v9("?length"):::projected v7("?year"):::projected a1((" ")) c5(["wd:Q4628"]):::iri c9(["fr,en,fo,dk"]):::literal c3(["wd:Q44377"]):::iri c7(["bd:serviceParam"]):::iri v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v1 --"wdt:P17"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P31".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 v1 --"rdfs:label"--> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P580".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P571".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1619".-> v6 end bind0[/"str(year-from-dateTime(?annee_debut_2))str(year-from-dateTime(?annee_debut_1))str(year-from-dateTime(?annee_debut_0))"/] v6 --o bind0 v5 --o bind0 v4 --o bind0 bind0 --as--o v7 subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2048".-> v8 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2043".-> v9 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P5130".-> v10 end