hi.

select id, max(start) from your_table group by id;

HTH.
-ravi.

-----Original Message-----
From: Rodrigo Gonzalez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 10:57 AM
To: [EMAIL PROTECTED]
Subject: GROUPING


Hi,

I have to do a query but i don't know how to do this...

I have this table

id int
start time
stop time
...
There are 2 to 4 rows for each id

I have to select one row for each id where start is the max value between
all rows with this id

If you have an idea please let me know

Thanks


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to