title: Calculating concurrent sessions given a start and end time
body: <p>i need to be able to work out how many sessions are running at any given time, per minute based on millions of rows of data like the ones below.</p>
  
  <p>I have tried melting the dataframe and have created a new column which is equal to 1 or -1 depending on whether its the start or the end. Summing that and grouping by time, I hoped would have worked.</p>
  
  <p>The issue is, lots of sessions may start the day before and because I can only query today, I end up with MINUS 2 million in the early hours of the mornings, as those sessions end.</p>
  
  <p>Is there a good way to do this &amp; chart it so it shows the number of sessions at any given time?</p>
  
  <pre><code>2020-05-31 00:00:01 | 2020-05-31 00:00:31   
  2020-05-31 00:01:01 | 2020-05-31 00:02:01   
  2020-05-31 00:02:01 | 2020-05-31 00:06:03   
  2020-05-31 00:03:01 | 2020-05-31 00:04:01   
  2020-05-31 00:04:01 | 2020-05-31 00:34:01   
  </code></pre>