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
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] GREAT
>I want to look through the last 15 records
ORDER BY ?? LIMIT 0,15
>d find the highest and/or
> lowest number
SELECT MAX(field),MIN(field)
Op dinsdag 12 maart 2002 03:19, schreef u:
> Could anyone give me an example of how to use GREATEST
> and LEAST in a MySQL query. I want to look through th