title: Getting all values based on value in another table
body: <p>This should be really easy but for some reason me and my brain don't want to cooperate today.</p>
  
  <p>I've got a table <code>sales</code> that contains a <code>brick_region</code> column. A brick region always belongs to a <code>region</code>. Now I want to select all values in <code>sales</code> that belong to the region of the specific brick region that I've selected. How do I do this?</p>
  
  <pre><code>SELECT *
  FROM sales
  JOIN brick_regions
  ON (brick_regions.id = sales.brick_region)
  WHERE sales.date BETWEEN '2014-01-01' AND '2014-03-30'
  AND sales.brick_region = 2
  </code></pre>
  
  <p>But I want the last line to be this instead:</p>
  
  <pre><code>AND brick_regions.region = [region ID of the brick region with ID 2]
  </code></pre>