Hallo everybody. I have a problem with a query.
I need to select the max value of a field in a table and after I want to show all the record (the max value and the other field).
For exemple:
200 CH1 CAT
220 CH3 DOG
Output --> 220 CH3 DOG
So I write this query:
select max(value), id_animal, description from table
But doesn't work. The error say that id_animal and description must be included in the "aggregation function"...
Any ideas?
Thanks for the help.
Greetings!
I need to select the max value of a field in a table and after I want to show all the record (the max value and the other field).
For exemple:
200 CH1 CAT
220 CH3 DOG
Output --> 220 CH3 DOG
So I write this query:
select max(value), id_animal, description from table
But doesn't work. The error say that id_animal and description must be included in the "aggregation function"...
Any ideas?
Thanks for the help.
Greetings!