在连接之前对顺序排序

时间:2017-06-03 00:37:29

标签: sorting sparql wikidata

我有一个Wikidata SPRQL脚本,其开头如下:

SELECT
      (group_concat(distinct     ?dateYear ; separator = ", ") AS     ?dateYears)
      (group_concat(distinct  ?gameENLabel ; separator = ", ") AS  ?gameENLabels)
      WHERE {
        VALUES ?game {
          wd:Q4850488
          wd:Q4931588
          wd:Q5315330
        }
        ?game rdfs:label ?gameENLabel.
        FILTER(LANG(?gameENLabel) = "en").
        OPTIONAL {
          ?game wdt:P577 ?date.
          BIND(YEAR(?date) AS ?dateYear).
        }
        SERVICE wikibase:label {
          bd:serviceParam wikibase:language "en".
       }
      }
    GROUP BY $game
order by desc(?dateYears)

我可以在连接它们之前对?dateYear值进行排序吗?感谢。

0 个答案:

没有答案