www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Phrases
RDF data
db.dba.rdf_64bit_upg...
db.dba.rdf_audit_met...
db.dba.rdf_backup_me...
db.dba.rdf_convert_r...
db.dba.rdf_datatype_...
db.dba.rdf_graph_col...
db.dba.rdf_graph_dif...
db.dba.rdf_graph_gro...
db.dba.rdf_graph_gro...
db.dba.rdf_langmatch...
db.dba.rdf_load_rdfa
db.dba.rdf_load_rdfx...
db.dba.rdf_load_rdfx...
db.dba.rdf_quad_uri
db.dba.rdf_quad_uri_...
db.dba.rdf_quad_uri_...
db.dba.rdf_regex
db.dba.rdf_restore_m...
db.dba.rdf_suo_apply...
db.dba.rdf_suo_diff_...
db.dba.rdf_triples_t...
db.dba.rdf_triples_t...
db.dba.rdf_ttl2hash
db.dba.rdf_void_stor...
db.dba.sparql_eval
db.dba.sparql_eval_t...
db.dba.sparql_rdb2rd...
db.dba.sparql_rdb2rd...
db.dba.sparql_rexec
db.dba.sparql_rexec_...
db.dba.sparql_rexec_...
db.dba.sparql_select...
db.dba.ttlp
db.dba.ttlp_mt
db.dba.ttlp_mt_local...
group_concat
group_digest
isref
rdf_view_sync_to_phy...
sample
__xml_get_ns_prefix
__xml_get_ns_uri
__xml_ns_iristr
__xml_ns_uname
__xml_nsexpand_irist...
http_nt_triple
http_ttl_triple
iri_split
ld_dir
rdfs_rule_set
sparql_to_sql_text
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
VAD
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
XML
XPATH & XQUERY

Functions Index

GROUP_CONCAT

returns an arbitrary value from the multiset passed to it.
GROUP_CONCAT (in token varchar, in delim varchar);
Description

GROUP_CONCAT 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
SQL>SPARQL 
SELECT ?name, (sql:GROUP_CONCAT(?near, ' , '))
WHERE 
  { 
    GRAPH ?g 
      { 
        [] a foaf:Person ; 
        foaf:name ?name ; 
        foaf:based_near ?near 
      } 
  }
LIMIT 10 

name callret-1
ANY  ANY
________________________________________________
Jonas Smedegaard	 nodeID://b6190457 , nodeID://b6190507
Dimitar Dimitrov	 http://mitko.dnsalias.net:8005/dataspace/person/dav#based_near , http://ods-qa.openlinksw.com/dataspace/person/dav1#based_near , http://ods-qa.openlinksw.com/dataspace/person/dav2#based_near
Adam Harvey	       nodeID://b780751
John Breslin	     nodeID://b56694
John Breslin	     nodeID://b56694
Chris Bizer	       http://sws.geonames.org/2950159/ , http://dbpedia.org/resource/Berlin
Leo Sauermann	     nodeID://b53598
Andreas Harth	     http://dbpedia.org/resource/Karlsruhe , nodeID://b53559 , nodeID://b53569
Alexandre Passant	 http://dbpedia.org/resource/Galway
Leon Lord	         http://ods-qa.openlinksw.com/dataspace/person/t1#based_near
No. of rows in result: 10