Re: Best way to sort?
| From: | Rob Adams | Date: | Thu, 03 Jun 2004 14:55:21 +0000 |
| Subject: | Re: Best way to sort? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187530@lists.php.net to get a copy of this message | ||
"Angelo Zanetti" <binc2@ctech.ac.za> wrote in message
news:BPEOIJEFGCBLOABOGLIDCEAIEFAA.binc2@ctech.ac.za...
> select thename, count(thename) from <tablename> order by thename asc group
> by thename
or...
to sort by number of records
select name, count(name) as ncnt from table group by name order by ncnt desc
-- Rob