View the latest documentation 5.3
Lenses SQL DSL (Domain Specific Language) can be extende with user defined and user defined aggregate functions.
User defined aggregation functions
Bring your own user defined aggregation SQL functions for Lenses SQL
User defined functions
Bring your own user defined SQL functions for Lenses SQL