title: Multiple ON clauses in the JOIN
body: <p>Is it possible to have two <code>ON</code> statements in <code>JOIN</code>? </p>
  
  <p>I have two tables:</p>
  
  <pre><code>+---------------+---------+
  | Column Name   | Type    |
  +---------------+---------+
  | product_id    | int     |
  | start_date    | date    |
  | end_date      | date    |
  | price         | int     |
  +---------------+---------+
  
  +---------------+---------+
  | Column Name   | Type    |
  +---------------+---------+
  | product_id    | int     |
  | purchase_date | date    |
  | units         | int     |
  +---------------+---------+
  
  </code></pre>
  
  <p>When I make a <code>JOIN</code> I write: <code>ON table1.product_id=table2.product_id</code>. But how can I add the clause that the <code>purchase_date</code> is also between <code>start_date</code> and <code>end_date</code>. I cannot get the right answer when I use a <code>WHERE</code> statement.</p>