Math

 

Use the following set of math functions in your queries:

 

Function

Parameter types

Result

Abs(x)

x - any numeric type value

Absolute value of x.

Arccos(x)

x - any numeric type value

x in range [-1, 1]

Arc cosine of x

Arcctn(x)

x - any numeric type value

Arc cotangent of x

Arcsin(x)

x - any numeric type value

x in range [-1, 1]

Arc sine of x

Arctan(x)

x - any numeric type value

Arc tangent of x

Cos(x)

x - any numeric type value

Cosine of x

Csec(x)

x - any numeric type value

Cosecant of x

Ctn(x)

x - any numeric type value

(x!= pi/2)

Cotangent of x

Exp(x)

x - any numeric type value

Exponent of x

Ln(x)

x - positive value of any numeric type

Natural logarithm of x

Log2(x)

x - positive value of any numeric type

Logarithm to the base 2 of x

Log10(x)

x - positive value of any numeric type

Common logarithm of x

Max(x,y)

x,y - any numeric type values

Returns the number with the highest value of two specified numbers

Min(x,y)

x,y - any numeric type values

Returns the number with the lowest value of two specified numbers

Power(x,y)

x,y - any numeric type value

x to the y power

Sec(x)

x - any numeric type value

Secants of x

Sin(x)

x - any numeric type value

Sine of x

Sqr(x)

x - any numeric type value

Square of x

Sqrt(x)

x - any none-negative value of numeric type

Square root of x

Tan(x)

x - any numeric type value

(x!= pi/2)

Tangent of x

AddDate(date, years, months, days)

date - DateTime value

years, months, days - any numeric values

Returns date with added years, months and days

AddTime(date, hours, minutes, seconds, milliseconds)

date - DateTime value

minutes, seconds, milliseconds - any numeric values

Returns date with added hours, minutes, seconds, milliseconds

SubDate(date, years, months, days)

date - DateTime value

years, months, days - any numeric values

Returns date with subtracted years, months and days

SubTime(date, hours, minutes, seconds, milliseconds)

date - DateTime value

minutes, seconds, milliseconds - any numeric values

Returns date with subtracted hours, minutes, seconds, milliseconds

 

Example:

 

var res = db.ExecuteQuery("SELECT PaidUser WHERE Abs(CurrentBalance – 20) > 0");

 

 

 

The following types of functions are available for your query:

 

·         Binary

·         Comparison

·         Logic

·         String

·         Expressions