query-ca151aeca742536591deb10fd5759c80

rq turtle/ttl

09:16, 26 August 2024 (UTC)) talk (VicarageSPARQL doesn't support this. But if you have basic programming skills you can fix it by changing the downloaded data. You basically:Concatenate the array with your preferred separator an write the string back. Sort the array. In your script, split the string by the sentinel value to an array. In the query group_concat() by using a sentinel value that is unlikely to appear in your data, for example "##".12:29, 26 August 2024 (UTC)) talk (Vicarage sites use lots of mediawiki extensions which I've extended to make the whole setup really, really clever, and of course I can post-process the data, just hoping not to. expounder.infoWow, something simple SPARQL can't do!!! My 11:56, 26 August 2024 (UTC)) talk (Infrastruktur. MVC design patternThat will do it. I noticed you use Mediawiki on your site, that might be overkill if you don't need crowdsourcing. A LAMP stack with a framework that does caching (!), routing and templating will work just as well. After all getting data from a database endpoint is just a network request which fits nicely in a BTW, I know that wrapping the query in another select level can work

Use at

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#>
SELECT DISTINCT ?item  (GROUP_CONCAT(DISTINCT ?keywordlist; SEPARATOR=", ") AS ?keywords)
WHERE {
  {
  SELECT DISTINCT ?item ?keywordlist WHERE {    
    VALUES ?item {wd:Q1180981 wd:Q950970 wd:Q2543161}.
    {?item wdt:P31 ?k. ?k rdfs:label ?keywordlist. FILTER (LANG(?keywordlist) = "en")}
  }
  ORDER BY ?item ?keywordlist
  }
}
GROUP BY ?item

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v3("?k") v2("?keywordlist"):::projected v4("?keywords") bind0[/VALUES ?item/] bind0-->v3 bind00(["wd:Q1180981"]) bind00 --> bind0 bind01(["wd:Q950970"]) bind01 --> bind0 bind02(["wd:Q2543161"]) bind02 --> bind0 f1[["?keywordlist = 'en'"]] f1 --> v2 v3 --"wdt:P31"--> v3 v3 --"rdfs:label"--> v2 bind3[/"?keywordlist"/] v2 --o bind3 bind3 --as--o v4