Dirk Bremer (NISC) wrote:
The following query produces the following results:

select job_coop as 'Job/Coop', count(*) as Count from queue group by
job_coop;

+----------+-------+
| Job/Coop | Count |
+----------+-------+
| B03013   |    19 |
| B05044   |     9 |
| B07037   |     6 |
| B15037   |     4 |
| B16032   |     6 |
| B17026   |     6 |
| B17056   |    18 |
| B18032   |     5 |
| B20009   |    31 |
| B21012   |     1 |
| B24026   |     8 |
| B25001   |    42 |
| B27043   |    10 |
| B27047   |     8 |
| B29064   |     6 |
| B31004   |    61 |
| B36035   |    60 |
| B36529   |    54 |
| B38023   |    38 |
| B38034   |     7 |
| B40020   |    30 |
| D18032   |    31 |
| D27047   |     2 |
| D31004   |    59 |
+----------+-------+

Is there a way to use the ORDER BY clause to order the results by the
numeric value of the count(*), i.e. so that the results would be sorted by
the result of the count(*)?

select job_coop as 'Job/Coop', count(*) as Count from queue group by job_coop order by Count;



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to