title: select with multiple conditiions in where in
body: <p>With tables <code>table1</code> and  <code>table2</code>need select the rows of <code>table1</code> for those <code>locationId</code>s and <code>hour</code>s where <code>tier</code> in <code>table2</code> is <code>high</code></p>
  
  <p><strong>table1</strong></p>
  
  <pre><code>+------------+------+---------+----------+
  | locationId | hour | metric1 |  metric2 |
  +------------+------+---------+----------+
  |       1111 |   10 |     200 |       40 |
  |       1111 |    9 |     300 |      -20 |
  |       1111 |   11 |    1800 |      300 |
  |       1122 |    9 |     600 |      800 |
  |       1122 |   11 |    2300 |      -10 |
  |       1133 |    8 |   10000 |       30 |
  +------------+------+---------+----------+
  </code></pre>
  
  <p><strong>table2</strong></p>
  
  <pre><code>+------------+------+-------+---------+
  | locationId | hour | value |   tier  |
  +------------+------+-------+---------+
  |       1111 |   10 |  1300 |  high   |
  |       1111 |    9 |   900 |  medium |
  |       1111 |   11 |   200 |  low    |
  |       1122 |    9 |   100 |  low    |
  |       1122 |   11 |  2300 |  high   |
  |       1133 |    8 |  1400 |  high   |
  +------------+------+-------+---------+
  </code></pre>
  
  <p>If it was one column - say <code>locationId</code> I could have done something like </p>
  
  <pre><code>select * from table1
  where locationId in (select locationId from table2 where tier='high');
  </code></pre>
  
  <p>How do I do this when the <code>locationId</code>, <code>hour</code> pair need to be compared?</p>
  
  <p><strong>output</strong></p>
  
  <pre><code>+------------+------+---------+----------+
  | locationId | hour | metric1 |  metric2 |
  +------------+------+---------+----------+
  |       1111 |   10 |     200 |       40 |
  |       1122 |   11 |    2300 |      -10 |
  |       1133 |    8 |   10000 |       30 |
  +------------+------+---------+----------+
  </code></pre>