title: explain this short SQL query
body: <p>Can someone please explain me this SQL query. This shows me the popular stores, but it doesn't works well.</p>
  
  <pre><code>sql = "SELECT t.name, t.slug, tt.count 
  FROM ".$wpdb-&gt;prefix."terms AS t INNER JOIN ".$wpdb-&gt;prefix."term_taxonomy AS tt ON t.term_id = tt.term_id
  WHERE 
    tt.taxonomy IN ('$tax_name') 
    AND tt.count &gt; 0 
  GROUP BY tt.count DESC 
  ORDER BY RAND() LIMIT $the_limit";
  </code></pre>