# SQL Sequence EQ, NE, GT, GE, LT, LE functions

> The `seq_eq()`, `seq_ne()`, `seq_gt()`, `seq_ge()`, `seq_lt()`, `seq_le()` functions return a Boolean value by applying the indicated logical operation comparing the values of elements from sequence 1 to the corresponding elements of sequence 2. The results are easily verified by examining the output below.

> Following is an example script demonstrating the `seq_eq()`, `seq_ne()`, `seq_gt()`, `seq_ge()`, `seq_lt()`, `seq_le()`functions:

>         INSERT INTO SimpleSequence(testNumber,iVal1,iVal2)
>         VALUES(3,'{42,-13,27,19}','{42,-12,26,20}');

>         SELECT iVal1,iVal2,seq_eq(iVal1,iVal2) AS "eq" FROM SimpleSequence WHERE testNumber=3;
>         SELECT iVal1,iVal2,seq_ne(iVal1,iVal2) AS "ne" FROM SimpleSequence WHERE testNumber=3;
>         SELECT iVal1,iVal2,seq_gt(iVal1,iVal2) AS "gt" FROM SimpleSequence WHERE testNumber=3;
>         SELECT iVal1,iVal2,seq_ge(iVal1,iVal2) AS "ge" FROM SimpleSequence WHERE testNumber=3;
>         SELECT iVal1,iVal2,seq_lt(iVal1,iVal2) AS "lt" FROM SimpleSequence WHERE testNumber=3;
>         SELECT iVal1,iVal2,seq_le(iVal1,iVal2) AS "le" FROM SimpleSequence WHERE testNumber=3;

>         iVal1{}
>         iVal2{}
>         eq{}
>         ------------------------------------------------------------
>         {42, -13, 27, 19}
>         {42, -12, 26, 20}
>         {1, 0, 0, 0}

>         iVal1{}
>         iVal2{}
>         ne{}
>         ------------------------------------------------------------
>         {42, -13, 27, 19}
>         {42, -12, 26, 20}
>         {0, 1, 1, 1}

>         iVal1{}
>         iVal2{}
>         gt{}
>         ------------------------------------------------------------
>         {42, -13, 27, 19}
>         {42, -12, 26, 20}
>         {0, 0, 1, 0}

>         iVal1{}
>         iVal2{}
>         ge{}
>         ------------------------------------------------------------
>         {42, -13, 27, 19}
>         {42, -12, 26, 20}
>         {1, 0, 1, 0}
>         iVal1{}
>         iVal2{}
>         lt{}
>         ------------------------------------------------------------
>         {42, -13, 27, 19}
>         {42, -12, 26, 20}
>         {0, 1, 0, 1}

>         iVal1{}
>         iVal2{}
>         le{}
>         ------------------------------------------------------------
>         {42, -13, 27, 19}
>         {42, -12, 26, 20}
>         {1, 1, 0, 1}

> ## Sample script

> A sample script to demonstrate this `select` statement using xSQL can be run from the `samples/xsql/scripts/financial` directory with the following command:

>         f 3