title: Multiple Date Range in a query
body: <p>I have few tables from where i want to create a query with multiple date range column. Here is an example:</p>
  
  <pre><code>          |  Date Range_1 |  Date Range_2 |
            |   01-31 Jan   |   01-30 Feb   |
  
            ---- col1,col2 -----col3, col4 ----
  
  
  
  SELECT temp_a.*
  FROM (SELECT col_1,col_2, col_3 from xyz WHERE (date BETWEEN '2011-01-01' AND '2011-01-30')
  AND id = 70
  GROUP BY a1 a2) temp_a
  INNER JOIN table1 t1 ON a.id = t1.id
  
  
  
  SELECT temp_b.*
  FROM (SELECT col_1, col_2, col_3 from xyz WHERE (date BETWEEN '2011-02-01' AND '2011-02-30')
  AND id = 70
  GROUP BY a1 a2) temp_b
  INNER JOIN table1 t1 ON b.id = t1.id
  
   I need all the column from temp_a and temp_b like this
  
   |temp_a.col_1 | temp_a.col_2 | temp_a.col_3 | temp_b.col_1 | temp_b.col_2 | temp_b.col_3 |
  </code></pre>
  
  <p>the above two query can return two different range value but i want to get the ranged values in a single query.</p>
  
  <p>Please help.</p>
  
  <p>thanks in advance. </p>
  
  <ul>
  <li>Shahidul, Dhaka, Bangladesh.</li>
  </ul>