title: How to add column based on dynamic column
body: <p>An example of a simple one to simplify understanding of a question, in a real query it will be difficult to simply write "value + 20".</p>
  
  <p>Example table</p>
  
  <pre><code>id | value |
  -------------
   1 |   20  |
   2 |   30  |
  </code></pre>
  
  <p>Query example:</p>
  
  <pre><code>SELECT id, value, value + 10 as value1, value1 + 10 as value2
  FROM table;
  </code></pre>
  
  <blockquote>
    <p>Error: ERROR: column "value1" does not exist</p>
  </blockquote>
  
  <p>Is there any way I can make this query work?</p>