7;,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(lpa
ood (one and only one for tomatoes, one and only one for
potatoes and so on).
Mateusz Uzdowski
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
That'd be the solution, but unfortunately i gave You incorrect example (too
little rows):
the problem is I don't have a constant number of foods. For example the
latest price of tomatoes could be from day 20 but the last price of potatoes
might be from day 19, and for onions from day 1. I need sing
latest price of tomatoes - from day 2nd)
How to do that? (in as little selects as possible)
Thanks for any help!
Mateusz Uzdowski
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Win NT).
Please, help me.
Best Regards
Mateusz Rudyk
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail &l