If you want to take top 5:
SELECT num, COUNT( num ) as c FROM table GROUP BY num order by c desc limit
5


Thanks,
Vikash Kumar
--
http://vika.sh


On Sun, Apr 11, 2010 at 8:07 AM, Dan Joseph <dmjos...@gmail.com> wrote:

> Eh, he's off topic, but we've talked plenty SQL on here before...
>
> SELECT num, COUNT( num ) FROM table GROUP BY num;
>
> I don't have a myqsl server to test that, but should do it.
>
> --
> -Dan Joseph
>
> www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
> Code "NEWTHINGS" for 10% off initial order
>
> http://www.facebook.com/canishosting
> http://www.facebook.com/originalpoetry
>

Reply via email to