Hi, I was wondering if there is a way I can do this in MySQL as a one line command: SELECT COUNT(*) as Qty, Name, 100 * Qty/(SELECT COUNT(*) from Table1) as Percent from Table1 GROUP BY Name; Currently I have to do this in two lines: SELECT COUNT(*) from Table1; SELECT COUNT(*) as Qty, Name, 100 * Qty/(RESULT_OF_ABOVE_STATEMENT) as Percent from Table1 GROUP BY Name; Any help is appreciated. jerome _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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