query-2736c42ceab60e27a18687307671a7cd

rq turtle/ttl

Trying to finding a 1 line mul solution reveals a bugThe upcoming mul change needs single line label/FILTER statements replaced with 3 line ones. In an attempt to circumvent this I coded

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?qcount ?qlabel ?quantity WHERE{
  VALUES ?item {wd:Q17122887}
   { ?item p:P516 [ps:P516 ?qname; pq:P1114 ?qcount].
   SERVICE wikibase:label {bd:serviceParam wikibase:language "en,mul".
     ?qname rdfs:label ?qlabel.
   }
    #works
    #BIND(CONCAT(" ",?qlabel) AS ?quantity)
    # does not work
    BIND(CONCAT(STR(?qcount)," ",?qlabel) AS ?quantity)
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v3("?qcount"):::projected v4("?qlabel"):::projected v2("?qname") v5("?quantity"):::projected a1((" ")) c5(["bd:serviceParam"]):::iri c7(["en,mul"]):::literal bind0[/VALUES ?item/] bind0-->v1 bind00(["wd:Q17122887"]) bind00 --> bind0 a1 --"p:statement/P516"--> v2 a1 --"p:qualifier/P1114"--> v3 v1 --"p:P516"--> a1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 v2 --"rdfs:label"--> v4 end bind1[/"concat(str(?qcount),' ',?qlabel)"/] v3 --o bind1 v4 --o bind1 bind1 --as--o v5