title: Calculate the sum of a column on weekly basis in hive
body: <p>I have a table say <code>testTable</code> in Hive(with data for 3 years) with the following columns: </p>
  
  <pre><code>retailers, order_total, order_total_qty, order_date
  </code></pre>
  
  <p>I have to create a new table with these columns: </p>
  
  <pre><code>'source_name' as source, sum(retailers), sum(order_total), sum(order_total_qty) 
  </code></pre>
  
  <p>for each week from the starting order_date.</p>
  
  <p>I am stuck with this. How can I group following data in the way that it will sum up on weekly basis.   </p>