title: Calculate sum of a group without window function
body: <p>I have a table</p>
  
  <pre><code>Country Population Continent
  </code></pre>
  
  <p>I am asked to find</p>
  
  <blockquote>
    <p>For each continent, find the country with largest % of populaiton in
    every continent.</p>
  </blockquote>
  
  <p>Sample Output</p>
  
  <pre><code>   Country Population_Rate Continent
      1       30%               A
      2       40%               B
  </code></pre>
  
  <p>No window function is allowed.No CTE.</p>
  
  <p>I can find the largest population, but I am not sure how to calculate rate (country_population/continent_population).</p>
  
  <pre><code>SELECT *, FROM t t1
  WHERE population &gt; ALL(SELECT * FROM t t2 WHERE t1.continent = t2.continent) 
  -- find largest population for each continent
  </code></pre>