After mysql group by grouping search query number
two methods whatever you choose
<pre>
the SELECT COUNT (DISTINCT colA) table1 from;
</ pre>
<pre>
the SELECT COUNT (*) from (colA from the SELECT table1 Group by colA) GYD;
</ pre>
with a sub-query must use an alias