title: Error "missing FROM-clause entry for table"
body: <p>When I use the following code, I get the error "missing FROM-clause entry for table zp". Does anyone know how I can eliminate this error?</p>
  
  <pre><code>SELECT SUM(zp.WP*et.GIS)
  FROM (SELECT DISTINCT zp.HHNR,zp.ZIELPNR FROM mobility.zielpersonen zp
  FULL OUTER JOIN mobility.etappen et
  ON zp.HHNR=et.HHNR AND zp.ZIELPNR=et.ZIELPNR
  ) as examp
  </code></pre>