Name

DB.DBA.SAMPLE — returns an arbitrary value from the multiset passed to it.

Synopsis

DB.DBA.SAMPLE ( in token varchar );
 

Description

DB.DBA.SAMPLE is aggregate function that returns an arbitrary value from the multiset passed to it.

Note: Using the "sql:" prefix is mandatory for this aggregate.

Parameters

strg

An item from multiset.

Return Types

any

Examples

Example 24.286. 

SQL>SPARQL
SELECT  (sql:SAMPLE(?nick)), (sql:SAMPLE(?interest))
WHERE
  {
    ?p a foaf:Person .
    ?p foaf:nick ?nick.
    ?p foaf:interest ?interest.
  }

callret-0   callret-1
VARCHAR           VARCHAR
________________________________________________
dr. Jones         http://purl.org/rss/1.0/

No. of rows in result: 1