Re: COUNT & AVG

From: Date: Fri, 05 Sep 2003 18:29:20 +0000
Subject: Re: COUNT & AVG
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-30367@lists.php.net to get a copy of this message
Shaun wrote:
Is it possible to combine the COUNT & AVG functions using MySQL? I have a table called Bookings and I need to find out the average number of bookings. So I need to count the number of bookings in the table and then get the Average, is this possible?
Learn SQL, please. SELECT COUNT(column), AVG(column) FROM table GROUP BY column -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.db (#30367) next »