title: Time range graph using Grafanas variables
body: <p>We are using the graph compare time and we want to compare the amount of sessions for example between 14 days ago and 28 days ago and same wih 30 days ago and 60 days ago.</p>
  
  <p>We currently wrote date BETWEEN $__timeFrom() AND $__timeTo() and it changes upon selecting the date ranges on the top right but we want the client to be able to change the date ranges and for this query to adjust to show -14 days and -30 days ago as well.</p>
  
  <pre><code>SELECT
    $__timeGroup(date, '24h'),
    sum(sessions) as sessions
  FROM
    ourchart
  WHERE
    date BETWEEN $__timeFrom() AND $__timeTo()
    group by time
    order by time
  </code></pre>
  
  <p>EDIT - I am able to make intervals of course but we are trying to compare this month to last month in the same graph....</p>