title: There is a column named ... it cannot be referenced from this part of the query sub query
body: <pre><code> WITH upt as (
   UPDATE backend."orders" SET "statusId" = 5
   WHERE "userId" IN (177962,88265) and "statusId" IN (0,1,2,3,4) RETURNING *
  )
   INSERT INTO __test_result(orderid) VALUES ((SELECT orderid FROM upt))
  </code></pre>
  
  <p>Need to update and log data,getting this error</p>
  
  <pre><code>ERROR: column "orderid" does not exist Hint: There is a column named 
  "orderid" in table "__test_result", but it cannot be referenced from this part of the query.
  </code></pre>
  
  <p>How can I insert in table for all "upt" rows?It must look </p>
  
  <pre><code>"upt.orderid","jsonb for that orderid"
  </code></pre>
  
  <p>for every order jsonb must be created from "upt" column with same orderid</p>