[thelist] sql: least/min value
Joxn
joxn at vernum.com
Sun Feb 25 18:00:35 CST 2001
Hi,
Somehow I have to select the set which has the minimum value for a
specific field.
I'm doing this at the moment:
SELECT id, file, url FROM ads WHERE state='1' AND XXXX ORDER BY id
and for XXXX, I have tried something like least(views) or min(views) but
neither work.
I'm using mySQL for this and I'm really confused as I think it *has* to
be very easy, but I can't find the appropriate function to do so.
TIA,
Joxn
--
|| //\\ \\// |\\|| :: joxn at vernum.com ::
\\|| \\// //\\ ||\\| :: 8053703 ::
More information about the thelist
mailing list