> Completely agree. For example, why isn't there functionality to define aliases for complex expressions and then reuse those through a query. Simple query-local SQL functions would be nice too.
What about common table expressions? Or custom defined functions?
with X as ( select... )
It's widely used for analysis