title: MySQL: Total GROUP BY WITH ROLLUP curiosity
body: <p>I have two queries. One of them makes sense to me, the other don't. First one:</p>
  
  <pre><code>SELECT gender AS 'Gender', count(*) AS '#'
      FROM registrations 
      GROUP BY gender WITH ROLLUP
  </code></pre>
  
  <p>That gives me this:</p>
  
  <pre><code>Gender       #
  Female      20
  Male        19
  NULL        39
  </code></pre>
  
  <p>So, I get the count, and the total count. What I expected. Next one:</p>
  
  <pre><code>SELECT c.printable_name AS 'Country', count(*) AS '#' 
      FROM registrations r 
      INNER JOIN country c ON r.country = c.country_id 
      GROUP BY country WITH ROLLUP
  
  Country         #
  Denmark         9
  Norway         10
  Sweden         18
  United States   1
  Uzbekistan      1
  Uzbekistan     39
  </code></pre>
  
  <p>Same result. But why do I get Uzbekistan for the total??</p>