title: How to count and order by max by other table in MySQL?
body: <p>I'm having two table:</p>
  
  <pre><code>CREATE TABLE `apps` (
      `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
      `name` VARCHAR(191) NOT NULL COLLATE 'utf8mb4_unicode_ci',
      PRIMARY KEY (`id`)
  )
  COLLATE='utf8mb4_unicode_ci'
  ENGINE=InnoDB
  ;
  
  CREATE TABLE `downloads_stats` (
      `app_id` INT(10) UNSIGNED NOT NULL,
      `date` DATE NOT NULL,
      `downloads` INT(10) UNSIGNED NOT NULL,
      PRIMARY KEY (`app_id`, `date`),
  )
  COLLATE='utf8mb4_unicode_ci'
  ENGINE=InnoDB
  </code></pre>
  
  <p>First is the list of my apps, the other stores the download number of each app. What is the best way to get 10 most downloaded apps ? I can do simple <code>JOIN</code> and then <code>SUM</code> and <code>ORDER BY</code> but is it the most efficient way?  </p>