title: How to group by date and find consecutive day count
body: <p>So I have a table like</p>
  
  <pre><code>product date_purchased
  apple   2018-08-01
  apple   2018-08-02
  apple   2018-08-03
  apple   2018-08-10
  apple   2018-08-11
  banana  2018-08-14
  </code></pre>
  
  <p>I am trying to look for how many times the product was purchased on consecutive days. like</p>
  
  <pre><code>apple   2018-08-01  1
  apple   2018-08-02  2
  apple   2018-08-03  3
  apple   2018-08-10  1
  apple   2018-08-11  2
  banana  2018-08-14  1
  </code></pre>
  
  <p>The first column in product, second column is the last date it was purchased and the third column is the days it was purchased consecutively. </p>
  
  <p>[EDIT]: Changed the output format</p>