Name

DB.DBA.GROUP_CONCAT_DISTINCT — returns a string that is concatenation of token strings delimited with delimiter

Synopsis

DB.DBA.GROUP_CONCAT_DISTINCT ( in token varchar ,
in delim varchar );

Description

DB.DBA.GROUP_CONCAT_DISTINCT is aggregate function that performs a string concatenation across the values of an expression with a group. The order of the strings is not specified. The separator character used in the concatenation may be given with the scalar argument delimiter.

Note: the "sql:" prefix is mandatory when this aggregate is used in SPARQL queries. In SQL queries the prefix is "DB.DBA".

Parameters

token

An item that should be added to a delimited list.

delim

The delimeter character to be used in the concatenation.

Return Types

any

Examples

Example24.288.Simple Use

SQL>SPARQL
SELECT ?name, (sql:GROUP_CONCAT_DISTINCT(?near, ' , '))
WHERE
  {
    GRAPH ?g
      {
        [] a foaf:Person ;
        foaf:name ?name ;
        foaf:based_near ?near
      }
  }
LIMIT 2

name callret-1
ANY  ANY
________________________________________________
Donny Hathaway   http://linkeddata.uriburner.com/about/id/entity/http/sws.geonames.org/3996063/ , http://linkeddata.uriburner.com/about/id/entity/http/sws.geonames.org/4990729/ , ..
Jill Scott           http://linkeddata.uriburner.com/about/id/entity/http/sws.geonames.org/3996034/ , http://linkeddata.uriburner.com/about/id/entity/http/sws.geonames.org/4990735/ , ...
No. of rows in result: 2