mysql - Select the ROW having the Maximum Value of a certain Column -
for example, if query returns 2 rows or more, select row having recent date.
i'm doing this:
select * table1 name=mark , max(timestamp(date(str_to_date(date_registered,'%d/%m/%y'))))
the error returned is: #1111 - invalid use of group function
you should use order statement:
select * table1 name=mark order str_to_date(date_registered,'%d/%m/%y') desc limit 1
Comments
Post a Comment