Re: Pretty Simple MAX Value question...

2002-05-09 Thread Arjen Lentz
At 16:30 -0400 5/9/02, Andrew Kuebler wrote: > I want to select say 100 of 1,000 records and get the highest value for > "id" in that query, however the MAX command always gives me the MAX for > the whole table, not just my query. > > Here's my expression: > SELECT MAX(id) FROM table WHERE DATE =

Re: Pretty Simple MAX Value question...

2002-05-09 Thread Paul DuBois
At 16:30 -0400 5/9/02, Andrew Kuebler wrote: >I want to select say 100 of 1,000 records and get the highest value for >"id" in that query, however the MAX command always gives me the MAX for >the whole table, not just my query. > >Here's my expression: > >SELECT MAX(id) FROM table WHERE DATE = '20

RE: Pretty Simple MAX Value question...

2002-05-09 Thread Gurhan Ozen
al Message- From: Andrew Kuebler [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 4:31 PM To: [EMAIL PROTECTED] Subject: Pretty Simple MAX Value question... I want to select say 100 of 1,000 records and get the highest value for "id" in that query, however the MAX command always

RE: Pretty Simple MAX Value question...

2002-05-09 Thread Max Anderson
SELECT MAX(id) FROM (SELECT MAX(id) FROM table WHERE DATE = '20020509' LIMIT 100) Dunno if this works in MySQL, I can't access a MySQL database from here to test it out. This should return the value that you want but I would be interested to learn the usefulness of runni

Pretty Simple MAX Value question...

2002-05-09 Thread Andrew Kuebler
I want to select say 100 of 1,000 records and get the highest value for "id" in that query, however the MAX command always gives me the MAX for the whole table, not just my query. Here's my expression: SELECT MAX(id) FROM table WHERE DATE = '20020509' LIMIT 100 No matter what, I will always get