Re: Sort by bigger count(*)
| From: | Andrew Sterling Hanenkamp | Date: | Wed, 01 Aug 2001 00:36:30 +0000 |
| Subject: | Re: Sort by bigger count(*) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-60543@lists.php.net to get a copy of this message | ||
Unless you've used GROUP BY you'll only return one row. I think that something like
SELECT x, count(y)
FROM table
GROUP BY y
ORDER BY count(y);
Ought to work.
Later,
Sterling
Elias wrote:
Hello, I made a query that uses count(*) now how can i get the results sorted following the biggest count(*) result?