title: ORA-01799: a column may not be outer-joined to a subquery
body: <p>Here is my query</p>
  
  <pre><code>SELECT 
      COUNT(C.SETID)
  FROM 
      MYCUSTOMER C
      LEFT OUTER JOIN MYCUSTOPTION CO 
      ON 
          (C.SETID = CO.SETID 
              AND C.CUST_ID = CO.CUST_ID 
              AND CO.effdt = ( 
                  SELECT MAX(COI.EFFDT) 
                  FROM MYCUSTOPTION COI 
                  WHERE 
                      COI.SETID = CO.SETID 
                                      AND COI.CUST_ID = CO.CUST_ID 
                                      AND COI.EFFDT &lt;=SYSDATE    
                  )
      )
  </code></pre>
  
  <p>and here is the error message that I am getting.. </p>
  
  <p><img src="https://i.stack.imgur.com/hszh0.png" alt="enter image description here"></p>
  
  <p>What am I doing wrong???</p>