title: Rails ActiveRecord: How to query the maximum value of column A and group by column B?
body: <p>I want to do something like</p>
  
  <pre class="lang-rb prettyprint-override"><code>  Model.select(column_a: :maximum, :column_b).group_by(:column_b)
  </code></pre>
  
  <p>I am using MySQL 5.6 and rails 5</p>