title: sql divide column by column max
body: <p>I have a column of count and want to divide the column by max of this column to get the rate. 
  I tried </p>
  
  <pre><code>select t.count/max(t.count)
  from table t
  group by t.count
  </code></pre>
  
  <p>but failed.
  I also tried the one without GROUP BY, still failed.</p>
  
  <p>Order the count desc and pick the first one as dividend didn't work in my case. Consider I have different counts for product subcategory. For each product category, I want to divide the count of subcategory by the max of count in that category. I can't think of a way avoiding aggregate func.</p>