Is it perhaps actually MAX and MIN? SELECT MAX(profit) FROM schemes WHERE revenue>expenses
(not tested, confirmed etc :P) HTH Beau // -----Original Message----- // From: Jeff Oien [mailto:[EMAIL PROTECTED]] // Sent: Tuesday, 12 March 2002 10:20 AM // To: PHP-DB // Subject: [PHP-DB] GREATEST, LEAST // // // Could anyone give me an example of how to use GREATEST // and LEAST in a MySQL query. I want to look through the // last 15 records in a certain field and find the highest and/or // lowest number. Thanks. // Jeff Oien // // -- // PHP Database Mailing List (http://www.php.net/) // To unsubscribe, visit: http://www.php.net/unsub.php // -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php