Re: MAX() and GROUP BY question

2006-11-12 Thread Jochem van Dieten
On 11/10/06, [EMAIL PROTECTED] wrote: Hello everybody Can you explain me please how to get the entire row where ID is maximum per given status_id Mysql 4.0.xx Have you checked the manual? There is an entire page specifically about the group-wise maximum. Jochem -- MySQL General Mailing List

Re: MAX() and GROUP BY question

2006-11-11 Thread [EMAIL PROTECTED]
f there is more optimised solution Thanks a lot - Original Message From: Tim Lucia <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Saturday, November 11, 2006 3:56:49 PM Subject: RE: MAX() and GROUP BY question How about select ID, X, Y, Z from USERS order by ID desc limit 1

RE: MAX() and GROUP BY question

2006-11-11 Thread Tim Lucia
How about select ID, X, Y, Z from USERS order by ID desc limit 1 Tim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 10, 2006 5:47 PM To: mysql@lists.mysql.com Subject: MAX() and GROUP BY question Hello everybody Can you explain me please

MAX() and GROUP BY question

2006-11-10 Thread [EMAIL PROTECTED]
Hello everybody Can you explain me please how to get the entire row where ID is maximum per given status_id Mysql 4.0.xx for example: id status_idnamedate 6 3 name0 date0 5 1 name1 date1 7 4 name3 date3 10 3 name2