eXtremeSQL Analytics Functions

The eXtremeDB for HPC package provides a library of analytics functions that operate on sequences. Please use the links on the SQL Analytics Functions by Category page to view detailed explanations of these functions. There are also a number of examples in the SQL Analytics Examples page that demonstrate many of these functions.

Sample Scipts

The samples/xsql/scripts/financial directory contains a number of command and script files to facilitate running select commands to demonstrate groups of statistical functions. The following table contains links to these groups of samples by category. The examples in categories 1-5 can be run using the command file f.bat (f.sh in Linux systems) and categories 6-11 can be run using g.bat (g.sh in Linux systems). Simply type f or g followed by a space and the category number to run the SQL script.

For instance, to experiment with the “Binary” functions, type

 
    f 3
     

To experiment with the “Grid Agg” functions, type

 
    g 7
     

The command file invokes xSQL with the appropriate SQL script files. The individual script files define and initialize specific sample tables appropriate to the functions being demonstrated, then perform the individual select statements described in the associated pages.

(Please note that the output from xSQL will be formatted differently from that printed in the pages describing the individual functions as we have reformatted the text there and highlighted specific elements to aid in describing the operations being performed.)

Some of the sample script files load and operate on table SimpleSequence defined as follows:

 
    create table SimpleSequence(
        testNumber unsigned(4) primary key,
        bVal1 sequence(unsigned(1)),
        bVal2 sequence(unsigned(1)),
        bVal3 sequence(unsigned(1)),
        iVal1 sequence(int(4)),
        iVal2 sequence(int(4)),
        iVal3 sequence(int(4)),
        fVal1 sequence(float),
        fVal2 sequence(float),
        fVal3 sequence(float),
        dVal1 sequence(double),
        dVal2 sequence(double),
        dVal3 sequence(double),
        ts1 sequence(unsigned(4)),
        ts2 sequence(unsigned(4)),
        ui8 sequence(unsigned(8)) 
    );
     

Other scripts use the Quote table defined as follows:

 
    create table Quote(
        symbol char(21) primary key,
        day sequence(unsigned(4) asc),
        low sequence(float),
        high sequence(float),
        open sequence(float),
        close sequence(float),
        volume sequence(unsigned(4))
    );