title: SQL query between current date and previous week
body: <pre><code>SELECT sge_job.j_owner AS "Owner"
        ,SUM(sge_job_usage.ju_cpu) AS "CPU Total"
  FROM sge_job_usage, sge_job 
  GROUP BY j_owner;
  </code></pre>
  
  <p>Here is my current sql query that just simply reads in CPU% and job owner but I'm having trouble incorporating only sum above if it's between current date say 14days(2 weeks) ago.</p>
  
  <p>In the <code>sge_job_usage</code> table belongs both:</p>
  
  <p><code>ju_start_time</code>, <code>ju_end_time</code></p>
  
  <p>Anyone help me towards how I can get it to check if it's between current date - 14 days before and then it checks <code>end_time</code> date to see if it was still going then?</p>
  
  <p><code>Answer that Outputs What I need below:</code></p>
  
  <pre><code>SELECT sge_job.j_owner AS "Owner"       
  ,SUM(sge_job_usage.ju_cpu) AS "CPU Total" 
  FROM sge_job_usage, sge_job  
  WHERE ju_start_time BETWEEN LOCALTIMESTAMP - INTERVAL '1 week' AND LOCALTIMESTAMP 
  GROUP BY j_owner;
  </code></pre>