There's an example at the bottom of this file:
https://github.com/google/zetasql/blob/master/zetasql/exampl...
What about scalar valued functions? :) So I can reuse an expression in a WHERE and so forth
(and I appreciate that HAVING can be generalized/removed)