If I'm understanding 'pre-decoder stage' correctly, maybe one of these is relevant: Sqlite now supports CTEs (WITH clause) which may help you concisely define a function. [](https://www.sqlite.org/lang_with.html) For basic statistics functions, note the contribution of extension-functions.c at [](https://sqlite.org/contrib/) or [](https://github.com/nalgeon/sqlean/blob/0.4.0/docs/stats.md) Should you be using the CLI (command line interface utility program), it does indeed support named parameters. [](https://www.sqlite.org/cli.html#sql_parameters)