title: PL/SQL add 7 days to datetime and get something between that date
body: <p>Ok, so i have database on PL/SQL.</p>
  
  <p>Here is my sql question:</p>
  
  <pre><code>SELECT t.AC_NUMBER, t.DATE, a.comment_1, a.comment_2, a.comment_3, a.comment_4
    FROM proddba.cust_info t
         left join proddba.cust_descr a on a.ac_number=t.ac_number
   where a.open_date=(select min(b.open_date) 
                        from proddba.cust_descr b 
                       where b.ac_number=t.ac_number 
                         and b.open_date&gt;=t.date 
                         and b.open_dane&lt;=t.date+7days)
  </code></pre>
  
  <p>How to dynamically add +7 days to date?</p>
  
  <p>And second, how to get only one date <code>min(b.open_date)</code> if there is two this same datas? Should I use <strong>distinct</strong>?</p>
  
  <pre><code>(select distinct min(b.open_date) 
     from proddba.cust_descr b 
    where b.ac_number=t.ac_number 
      and b.open_date&gt;=t.date 
      and b.open_dane&lt;=t.date+7days)
  </code></pre>
  
  <p>If have to get about 15000 records from database, is this should work?</p>
  
  <p>Best Regards</p>