title: Do I use inner join or left join?
body: <p>I have two separate tables I'm pulling data from with the associate_id being the primary key. I'm trying to find all sales(sales_charge found in sales.dim) made by Associate_ID over several transactions within the last 4 months and the last year. I'm having a hard time with the time stamp and the joins. </p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>SELECT associate_id
  , sales.dim.sales_charge
  FROM dbo.associate
  LEFT JOIN dbo.sales ahd
  ON associate_id = ahd.associate_id
  AND ahd.end_dt &gt; GETDATE()
  </code></pre>
  
  <p>I'm new to SQL and coding in general, please let me know what I'm missing.</p>
  
  <p>Thanks</p>