This HTML5 document contains 32 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

PrefixNamespace IRI
n16http://docs.openlinksw.com/virtuoso/fn_GROUP_CONCAT.
dctermshttp://purl.org/dc/terms/
atomhttp://atomowl.org/ontologies/atomrdf#
foafhttp://xmlns.com/foaf/0.1/
n21http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/VirtTipsAndTricksGuideSampleGroupConcatGroupDigest/sioc.
n10http://vos.openlinksw.com/dataspace/services/wiki/
oplhttp://www.openlinksw.com/schema/attribution#
n2http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/
n13http://docs.openlinksw.com/virtuoso/fn_SAMPLE.
dchttp://purl.org/dc/elements/1.1/
n12http://vos.openlinksw.com/dataspace/dav#
rdfshttp://www.w3.org/2000/01/rdf-schema#
n9http://rdfs.org/sioc/services#
siocthttp://rdfs.org/sioc/types#
n7http://vos.openlinksw.com/dataspace/person/dav#
n4http://vos.openlinksw.com/dataspace/owiki/wiki/
n17http://docs.openlinksw.com/virtuoso/fn_GROUP_DIGEST.
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
n15http://vos.openlinksw.com/dataspace/owiki#
xsdhhttp://www.w3.org/2001/XMLSchema#
n19http://vos.openlinksw.com/dataspace/person/owiki#
siochttp://rdfs.org/sioc/ns#
Subject Item
n7:this
foaf:made
n2:VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
Subject Item
n12:this
sioc:creator_of
n2:VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
Subject Item
n10:item
n9:services_of
n2:VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
Subject Item
n15:this
sioc:creator_of
n2:VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
Subject Item
n4:VOS
sioc:container_of
n2:VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
atom:entry
n2:VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
atom:contains
n2:VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
Subject Item
n2:VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
rdf:type
atom:Entry sioct:Comment
dcterms:created
2017-06-13T05:49:05.165900
dcterms:modified
2017-06-13T05:49:05.165900
rdfs:label
VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
foaf:maker
n7:this n19:this
dc:title
VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
opl:isDescribedUsing
n21:rdf
sioc:has_creator
n12:this n15:this
sioc:content
%META:TOPICPARENT{name="VirtTipsAndTricksGuide"}% ---++What is the difference between the functions SAMPLE, <nowiki>GROUP_CONCAT</nowiki> and <nowiki>GROUP_DIGEST</nowiki>? This example demonstrates the differences between the functions <code>[[http://docs.openlinksw.com/virtuoso/fn_SAMPLE.html][SAMPLE]]</code>, <code>[[http://docs.openlinksw.com/virtuoso/fn_GROUP_CONCAT.html][<nowiki>GROUP_CONCAT</nowiki>]]</code> and <code>[[http://docs.openlinksw.com/virtuoso/fn_GROUP_DIGEST.html][<nowiki>GROUP_DIGEST</nowiki>]]</code>. Assume the following query that should get all <code>?assets</code> as a list with delimiters: <verbatim> SPARQL SELECT ?view ?path (sql:GROUP_CONCAT (?asset, ' ')) as ?asset_list FROM <http://mygraph.com> WHERE { ?view <viewPath> ?path ; <viewContent> ?asset ; <viewType> 'phyview'. } ; </verbatim> This method is not universal, because conversion to strings will eliminate the difference between strings and IRIs and there should be some delimiter that never appears in values of <code>?asset</code>. In addition, the query may fail with "row too long" error if values of <code>?asset</code> are lengthy and/or numerous enough. It is also possible the query not work completely free from duplicates if more than one list is desired. E.g.: <verbatim> SPARQL SELECT ?view (sql:GROUP_CONCAT (?path, ' ')) as ?path_list (sql:GROUP_CONCAT (?asset, ' ')) as ?asset_list FROM <http://mygraph.com> WHERE { ?view <viewPath> ?path ; <viewContent> ?asset ; <viewType> 'phyview' . } </verbatim> will not contain duplicates in lists only if either <code>?path</code> or <code>?asset</code> is unique for every found <code>?view</code>; but if it's so unique then there's no need in the corresponding <code>sql:[[http://docs.openlinksw.com/virtuoso/fn_GROUP_CONCAT.html][<nowiki>GROUP_CONCAT</nowiki>]]()</code> . If there are many values per property but it's enough to return any single value and ignore the rest then use <code>sql:[[http://docs.openlinksw.com/virtuoso/fn_SAMPLE.html][SAMPLE]]()</code> function instead of <code>sql:[[http://docs.openlinksw.com/virtuoso/fn_GROUP_CONCAT.html][<nowiki>GROUP_CONCAT</nowiki>]]() </code>. If there are many values per property and it's better to show more than one value but "row too long" error happens, then the <code>sql:[[http://docs.openlinksw.com/virtuoso/fn_GROUP_DIGEST.html][<nowiki>GROUP_DIGEST</nowiki>]]</code> function can be used: <verbatim> SPARQL SELECT ?view (sql:GROUP_DIGEST (?path, ' ', 1000, 1)) as ?path_list (sql:GROUP_DIGEST (?asset, ' ', 1000, 1)) as ?asset_list FROM <http://mygraph.com> WHERE { ?view <viewPath> ?path ; <viewContent> ?asset ; <viewType> 'phyview' . } </verbatim> ---++Related * [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]] * [[http://docs.openlinksw.com/virtuoso/fn_SAMPLE.html][SAMPLE]] * [[http://docs.openlinksw.com/virtuoso/fn_GROUP_CONCAT.html][<nowiki>GROUP_CONCAT</nowiki>]] * [[http://docs.openlinksw.com/virtuoso/fn_GROUP_DIGEST.html][<nowiki>GROUP_DIGEST</nowiki>]]
sioc:id
ca0128e31b0c59fec5f3c034797d4be5
sioc:link
n2:VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
sioc:has_container
n4:VOS
n9:has_services
n10:item
atom:title
VirtTipsAndTricksGuideSampleGroupConcatGroupDigest
sioc:links_to
n13:html n16:html n17:html
atom:source
n4:VOS
atom:author
n7:this
atom:published
2017-06-13T05:49:05Z
atom:updated
2017-06-13T05:49:05Z
sioc:topic
n4:VOS