title: Find the Month with the Largest Profit in MYSQL
body: <p>I have a table of daily profits and I want to find the month which made the largest total profit.</p>
  
  <p>This is a sample of the base table</p>
  
  <pre><code>date        name              profit
  
  2020-06-08  Voice Of Calm       7.5
  2020-06-06  Pour Me A Drink     -1
  2020-06-09  Sacred Dance        -1
  2020-06-09  Paintball Wizard    -1
  2020-06-09  Aljady               8
  2020-06-09  Brian Epstein       -1
  2020-06-09  Beautiful Illusion  -1
  2020-06-09  Caravan Of Hope     -1
  2020-06-09  Captain Corelli     -1.5
  2020-06-09  Squelch              3.6
  2020-06-09  Robeam              -1
  2020-06-07  Midnights Legacy     5.6
  2020-06-08  Tafish               -1
  2020-06-09  What Will Be         6.45
  </code></pre>
  
  <p>There are multiple entries per day.</p>
  
  <p>The output I am looking for would be the month which had the largest total profit. I know that Dec 2019 produced 122 points profit, therefore the output of the query would be:</p>
  
  <pre><code>Year  Month  Total Profit
  2019  Dec    122
  </code></pre>
  
  <p>One thing which might cause an issue is where 2 months have the same profit, so April 2018 and 2019 both returned the same value. In this instance I would only want to return the latest month - April 2019</p>
  
  <p>Any help is much appreciated</p>