title: Sum of rows on Saturdays and Sundays
body: <p>I am trying to get the count of rows from my table for a day like Saturday or Sunday.</p>
  
  <p>The code below is not working. </p>
  
  <p>Any idea how to achieve this? </p>
  
  <pre><code>SELECT next_day(sysdate-8, 'SUN') from dual;
  
  NEXT_DAY(SYSDATE-8,)
  -------------------
  2014/11/02 21:22:30
  </code></pre>
  
  <p>My attempt:    </p>
  
  <pre><code>select sum(QTY),GROUP from table where next_day(order_date-8, 'SUN')  group by GROUP;
  </code></pre>