[snip] 1. An average disksize for each client, date doesn't matter. The result I'd like to see would be something like: "ABC INC","1.8" "Joe's Restaurant","1.2" [/snip]
mysql> SELECT CLIENT_NAME, AVG(DISK_SIZE) AS Average, MIN(DISK_SIZE) AS Minimum, MAX(DISK_SIZE) AS Maximum -> from table <----------this is a key word use something else -> GROUP BY CLIENT_NAME; +------------+---------+---------+---------+ |CLIENT_NAME | Average | Minimum | Maximum | +------------+---------+---------+---------+ | ABC INC | 2.00000 | 1.2 | 3.0 | | Eat at Joe | 1.90000 | 1.8 | 2.0 | +------------+---------+---------+---------+ 2 rows in set (0.00 sec) [snip] 2. The date of max disksize and the date of min disksize...in one query...if that's possible. [/snip] I have tried a number of ways and cannot get this one. HTH! Jay --------------------------------------------------------------------- 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