> select > substring_index(max(concat(lpad(day,4,'0'),'|',name,'|',id,'|',price)),' > |',1) + 0 as day, > > substring_index(substring_index(max(concat(lpad(day,4,'0'),'|',name,'|', > id,'|',price)),'|',2),'|',-1) as name, > > substring_index(substring_index(max(concat(lpad(day,4,'0'),'|',name,'|', > id,'|',price)),'|',3),'|',-1) as id, > > substring_index(substring_index(max(concat(lpad(day,4,'0'),'|',name,'|', > id,'|',price)),'|',4),'|',-1) as price > from food > group by food.name;
Works great! Thanks, You helped me a lot! Mateusz Uzdowski -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]