title: sum of count(*) for all rows in MySQL
body: <p>I'm stuck with <code>sum()</code> query where I want the sum of <code>count(*)</code> values in all rows with <code>group by</code>.</p>
  
  <p>Here is the query:</p>
  
  <pre><code>select
      u.user_type as user,
      u.count,
      sum(u.count)
  FROM
  (
  select 
      DISTINCT
      user_type,
      count(*) as count
  FROM
      users
  where
      (user_type = "driver" OR user_type = "passenger")
  GROUP BY
      user_type
  ) u;
  </code></pre>
  
  <p>Current Output:</p>
  
  <pre><code>----------------------------------
  |  user     |  count     |  sum  |
  ----------------------------------
  | driver    | 58         |  90   |
  ----------------------------------
  </code></pre>
  
  <p>Expected Output:</p>
  
  <pre><code>----------------------------------
  |  user     |  count     |  sum  |
  ----------------------------------
  | driver    | 58         |  90   |
  | passenger | 32         |  90   |
  ----------------------------------
  </code></pre>
  
  <p>If I remove <code>sum(u.count)</code> from query then output is looks like:</p>
  
  <pre><code>--------------------------
  |  user     |  count     |
  --------------------------
  | driver    | 58         |
  | passenger | 32         |
  --------------------------
  </code></pre>