Hi!
I couldn't find anything in archives, maybe I search for wrong phrase.
I'm running MySQL v.3.23.49 (if it's not possible under this version, I may
upgrade it).
What I need to accomplish is to find only last occurence of all possible
items from given column.

Supposing:

id    name        day    price
---------------------------
1    tomatoes        1    25
2    onions        1    13
3    onions        2    16
4    tomatoes        2    30

I want to obtain only:

3    onions        2    16        (latest price of onions - from day 2nd)
4    tomatoes    2    30        (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]

Reply via email to