title: SQL Sum by week from daily table
body: <p>I have a table with sales for products.
  The sales are per day. like</p>
  
  <pre><code>product    date         sales
  1          '2013-11-01' 100
  1          '2013-11-02' 423
  1          '2013-11-03' 700
  1          '2013-11-04' 233
  2          '2013-11-01' 623
  2          '2013-11-02' 451
  2          '2013-11-03' 9000
  </code></pre>
  
  <p>I want to get a query which will show me the week over week sum of sales
  So something like:</p>
  
  <pre><code>product     week ending     sales
  1           '2013-11-01'    10000 
  1           '2013-11-08'    15000
  2           '2013-11-01'    4900
  2           '2013-11-08'    30000
  </code></pre>
  
  <p>I'm not sure how I get this weekly groups when summing up.</p>
  
  <p>I'm using teradata</p>