RE: getting the maximum value

2002-07-30 Thread Chris Kay
--- > -Original Message- > From: destr0 [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 31 July 2002 6:11 AM > Cc: [EMAIL PROTECTED] > Subject: getting the maximum value > > > If I hav a table "myTable": > > id nameamount > 1

Re: getting the maximum value

2002-07-30 Thread Gerald Clark
select name, amount from myTable order by amount desc limit 1; destr0 wrote: > If I hav a table "myTable": > > id nameamount > 1john2 2joel 15 > > I want to get the name of the person with the largest amount.. but I > can't see

getting the maximum value

2002-07-30 Thread destr0
If I hav a table "myTable": id nameamount 1john2 2joel 15 I want to get the name of the person with the largest amount.. but I can't seem to come up with a good query for this. I tried SELECT name FROM myTable WHERE amount =