我的查询是这样开始的:
SELECT
#MIN(?dateYear) AS ?dateYears)
(GROUP_CONCAT(DISTINCT ?dateYear ; separator = ", ") AS ?dateYears)
(CONCAT(GROUP_CONCAT(DISTINCT ?gameENLabel; separator = ", ") ,", ", GROUP_CONCAT(DISTINCT ?gameJALabel; separator = ", "), ", ", GROUP_CONCAT(DISTINCT ?hepburnLabel; separator = ", "), ", ", GROUP_CONCAT(DISTINCT ?gameZHLabel; separator = ", "), ", ", GROUP_CONCAT(DISTINCT ?pinyinLabel; separator = ", ")) as ?wookie)
(GROUP_CONCAT(DISTINCT ?dataLink ; separator = ", ") AS ?dataLinks)
#(?game AS ?dataPages)
(GROUP_CONCAT(DISTINCT ?wikiLink ; separator = ", ") AS ?wikiLinks)
(GROUP_CONCAT(DISTINCT ?wikiName ; separator = ", ") AS ?wikiNames)
WHERE {
...
}
它可以工作,但是当GROUP_CONCAT(DISTINCT ?gameJALabel; separator = ", ")
返回一个空弹簧时,紧接着它的逗号仍会被渲染。是否可以为CONCAT命令提供一个仅在前面的命令返回某些内容时才会呈现的分隔符?是否有更好的方法来完成我不了解的所有这些?谢谢!