Skip to main content

Row Functions

SQL Frames provides many standard SQL functions. The row functions operate on each row. Below is a list of all the supported functions

Numeric

FunctionComments
SQL.abs()Absolute value
SQL.round()Rounded value
SQL.least()Minimum value
SQL.greatest()Maximum value

Date

FunctionComments
Time.datediff()Difference between two dates
Time.datesub()Difference between a date and an interval

String

FunctionComments
SQL.substringSubstring value

Conditional Logic

Standard SQL supports CASE statement for conditional logic. SQL Frames supports such conditional logic using SQL.case and SQL.casee API. See the example below to note the two variants of the CASE statement.

Loading...

Bucket Fields

It is possible to bucket numeric fields into multiple buckets. For example, revenue can be bucketed into small , medium and large. This can be easily achieved using the SQL.bucket() API.

Loading...
note

Bucket API is just a syntactic sugar for a slightly complex CASE statement.