title: 15 days before today in SQL Server
body: <p>I am trying to find the list of specific job # from load date in our database with the specific condition and I have to use inner join as well. 
  i want to have last 15 days worth of Job # in my store procedure. 
  How do I set up the LoadDate that will change auto for last 15 days only.</p>
  
  <p>Here is my query:</p>
  
  <pre><code>select pr.Job_Number,
         Count(ItemCode1) as [Total Records], 
         si.PackageComplete
  from 
      processed_record pr
  inner join scanner_2 si on pr.ItemCode1 = si.ItemCode1
  where 
      pr.Format_Name like '%Lin%' and pr.LoadDate &gt;= '03/01/2016' 
  group by 
      pr.Job_Number, si.PackageComplete
  order by 
      si.PackageComplete, pr.Job_Number
  </code></pre>