title: Define a function in an SQL Navigator query
body: <p>I would like to extract a function from a piece of SQL-code which is used multiple times in one query. I'm looking for a functionality which is similar to the following (invented by me) syntax:</p>
  
  <pre><code>with f(x) as (return x+1)
  select f(thing1), f(thing2), f(thing3) from things
  </code></pre>
  
  <p>thing1, thing2, thing3 are integer columns in the table "things" in the example. Also, imagine that f is more complicated than an add-one function.</p>
  
  <p>How do I define a function inside a query?</p>