title: select distinct and count distinct in mysql
body: <p>Is this possible Selecting distinct rows from a table column and count repeated row for each distinct fields in a single query</p>
  
  <pre><code>$sql = "SELECT DISTINCT location and COUNT(DISTINCT location) 
          FROM ".$db_name.".$table_name 
          ORDER BY location ASC 
          LIMIT ". $start_page.",". $recordPer_page."";
  </code></pre>