Re: One last step
| From: | Ignatius Reilly | Date: | Tue, 03 Sep 2002 15:00:52 +0000 |
| Subject: | Re: One last step | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21539@lists.php.net to get a copy of this message | ||
Try
SELECT name, COUNT(*) AS nb
FROM mytable
GROUP BY name
ORDER BY nb DESC
Ignatius
"RClark" <rclark@swbanktx.com> wrote in message
news:20020903142811.93134.qmail@pb1.pair.com...
> Hello all,
>
> I have a MySQL database with some 2 million rows in it. I am counting
all
> of the different names in one column. How to I get these to come out in
> descending order, with the most numbers of one event at the top and going
> down from there?
>
> Thanks in advance,
> Ron Clark
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
----- Original Message -----
From: "RClark" <rclark@swbanktx.com>
To: <php-db@lists.php.net>
Sent: Tuesday, September 03, 2002 4:27 PM
Subject: [PHP-DB] One last step
> Hello all,
>
> I have a MySQL database with some 2 million rows in it. I am counting
all
> of the different names in one column. How to I get these to come out in
> descending order, with the most numbers of one event at the top and going
> down from there?
>
> Thanks in advance,
> Ron Clark
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>