title: Unsupported subquery with table in join predicate
body: <p>I am tried to run the next query but the next message appearance "Unsupported subquery with table in join predicate." Do you have some idea? I appreciate your comments.</p>
  
  <pre><code>WITH
    D1 AS (
    SELECT
      SETID,
      CUST_ID,
      MAX(EFFDT) AS EFFDT
    FROM
      `g4s-data-reporting.g4s_data.PS_CUST_CREDIT`
    WHERE
      EFFDT &lt;= CURRENT_TIMESTAMP()
    GROUP BY
      1,
      2 ),
  LEFT OUTER JOIN
      `g4s-data-reporting.g4s_data.PS_CUST_CREDIT` D
    ON
      A.SETID = D.SETID
      AND A.CUST_ID = D.CUST_ID
      AND D.EFFDT = (
      SELECT
        MAX(EFFDT) --select 2
      FROM
        `g4s-data-reporting.g4s_data.PS_CUST_CREDIT` D1
      WHERE
        D1.SETID = D.SETID
        AND D1.CUST_ID = D.CUST_ID
        AND D1.EFFDT &lt;= CURRENT_TIMESTAMP() )
    WHERE
      B.BUSINESS_UNIT IN ('00001',
        '00048')
      AND B.ITEM_STATUS = 'O'
      AND B.ENTRY_TYPE NOT IN ('AO',
        'CNVBC',
        'MC',
        'OA')
  </code></pre>