title: Alias a POSTGRES select statement
body: <p>I want to create new tables in the query and use them at the end for a final query. I don't remember what the syntax is and can't find it anywhere. (here is a basic example for illustration only).   </p>
  
  <pre><code>phones as 
      (
          SELECT phone_number from customers
      )
  
  
  emails as 
      (
          SELECT emails from customers
      )
  
  // do something with both
  </code></pre>