I'm trying to retrieve the top ten entries of a total count from a table. If I use the following select statement without the 'ORDER BY' clause it returns the totals but not in any sort of order. But when I add the 'ORDER BY' clause in it returns nothing.
Is there a way to structure the query to do the total and return the total list in descending or ascending order? Example: SELECT count(*) FROM events WHERE alert='1' GROUP BY sysid ORDER BY sysid LIMIT 10 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php