MySQL Forums
Forum List  »  Newbie

Re: Max Query Issue
Posted by: Felix Geerinckx
Date: May 20, 2005 11:28AM

JOHN FARRUGIA wrote:

> Select id,reference,max(value)
> from data_readings.lts4a_accel_torquer
> where reference='total_parts' and readtime between '2005-5-20 6:30:0' and '2005-5-20 12:41:46'
> group by reference;

1) Use the correct datetime format: yyyy-mm-dd hh:mm:ss
2) Read about GROUP BY with hidden fields here: http://dev.mysql.com/doc/mysql/en/group-by-hidden-fields.html

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
May 20, 2005 11:19AM
Re: Max Query Issue
May 20, 2005 11:28AM
May 20, 2005 12:17PM
May 20, 2005 01:32PM
May 20, 2005 01:58PM
May 20, 2005 02:19PM
May 20, 2005 02:28PM
May 20, 2005 02:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.