Escaping within the SELECT clause

You can escape 1010data Macro Language code within a SELECT clause.

As an example, you can make use of the 1010data g_median group function (which returns the median value for a column within a group):
SELECT lahmanid, year, {hr-g_median(lahmanid;;hr)} AS homeRunDifference
The escaped 1010data Macro Language expression uses an alias, AS homeRunDifference. The alias is used to reference the Macro Language code, and it is required.

Notice here that the syntax of the escape sequence {hr-g_median(lahmanid;;hr)} is that of the 1010data Macro Language, not SQL. One example of how the two syntaxes differ is that in the 1010data Macro Language expression, a semicolon is used to separate the function arguments.