SED, Friday, February 01, 2002, 5:56:38 PM, you wrote: S> Hi,
S> I'm trying to make a query where I select something distinct ordered by S> most frequent? S> I found below example from the manual but I can not figure out how I S> should order them by most frequent - do you know how? S> SELECT DISTINCT owner FROM pet SELECT DISTINCT owner, count(owner) AS frequency FROM pet GROUP BY owner ORDER BY frequency DESC; S> Regards, S> SED -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- 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