I'm trying to perform an sql query for this:
Query one field, use count() to get the amount of times they are in there. This works just fine, but I can only sort by the column that I am querying.
My question is, is there any way I can sort the results by the count(*) I receive?
example query:
select printer, count(*) from problems group by printer;
this gives my all the unique printers that are in the db, and the number of times they are in there. But not in the order of count. I'd like to be able to sort by count (I have hundreds of printers in the db) so I can see which ones have been in there the most.
Thanks in advance for any assistance. I hope this is clear enough.