title: calculate CAGR using SQL
body: <p>I have a dataset which looks like below</p>
  
  <pre><code>ADVERTISER       YR     REVENUE
  ---------------------------------
  Altus Dental    2015    5560.00
  Altus Dental    2016    48295.00
  Altus Dental    2017    39920.00
  </code></pre>
  
  <p>I'm trying to find CAGR - year over year and taking an average of them, meaning</p>
  
  <pre><code>CAGR = (((REVENUE(2016)/REVENUE(2015)) - 1) + ((REVENUE(2017)/REVENUE(2016)) - 1) ) / 2
  </code></pre>
  
  <p>And Finally I will need an output something like this</p>
  
  <pre><code>ADVERTISER      CAGR
  --------------------
  Altus Dental    3.75
  </code></pre>
  
  <p>How can I accomplish this in SQL? Please help me in providing an effective solution for this.</p>