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
__max
__max_notnull
__min
__min_notnull
abs
atof
atoi
bit_and
bit_not
bit_or
bit_shift
bit_xor
ceiling
either
equ
exp
floor
isdouble
isfinitenumeric
isfloat
isinteger
isnumeric
iszero
log
log10
lower
mod
power
randomize
rnd
sign
sqrt
trigonometric
Phrases
RDF data
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

__min

Returns minimum value among all its arguments.
any __min ( arg1 any, arg2 any, ... , argN any);
Description

The function returns the minimum value among all values in all its arguments.

Parameters
argI – Values which can be with type float, integer etc.
Examples

Example 1

SQL> select __min(12, 2.34, 5, 20);
__min
VARCHAR
_______________________________________________________________________________

2.34

1 Rows. -- 32 msec.

Example 2

SQL> SPARQL 
INSERT INTO GRAPH <http://mygraph2.com>
  { 
    <http://mygraph2.com/pricing/#QVal1> <price1>  1 ; <price2> 9 ; <price3> 5 .
    <http://mygraph2.com/pricing/#QVal2> <price1>  3 ; <price2> 1 ; <price3> 4 .
    <http://mygraph2.com/pricing/#QVal3> <price1>  6 ; <price2> 2 ; <price3> 2 .
  };
  
Insert into <http://mygraph.com>, 9 (or less) triples -- done
No. of rows in result: 1
 
  
SQL> SPARQL SELECT ?s (bif:__min(?pr1, ?pr2, ?pr3))
FROM <http://mygraph2.com>
WHERE 
  {
    ?s <price1> ?pr1 ;  
       <price2> ?pr2 ;  
       <price3> ?pr3 
  };  	
  
Query result:
s                                     callret-1
VARCHAR 	                            VARCHAR
_______________________________________________
http://mygraph2.com/pricing/#QVal3	  2
http://mygraph2.com/pricing/#QVal2	  1
http://mygraph2.com/pricing/#QVal1	  1

No. of rows in result: 3