title: Are sql queries with WITH statement and without equal?
body: <p>I have two queries:</p>
  
  <pre><code>WITH table1
       AS (SELECT id,
                  first  AS table1_first,
                  second AS table1_second
           FROM   some_table)
  SELECT omt.*,
         t1.*
  FROM   one_more_table omt
         INNER JOIN table1 t1
           ON omt.id = t1.id;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>SELECT omt.*,
         t1.*
  FROM   one_more_table omt
         INNER JOIN (SELECT id,
                            first  AS table1_first,
                            second AS table1_second
                     FROM   some_table) AS t1
           ON omt.id = t1.id; 
  </code></pre>
  
  <p>Tell me are this two sql queries equal?</p>