I want to select the max id_product
and date that corresponds to this max id.
my problem is that it returns the max id_ product with a different date.
I can't use the max(date) because it will return always the max what i need is the date of this max id.
This my query :
SELECT
MAX(id_product),
`date`
FROM `products`
WHERE `fk_stat` = '1' and `id_order` = '77185' ;
The result:
But the value that's must return:
09/07/2015 for id = 152752
Thanks for your help.