Selecting most recent values

Hello,

Another doubt I’m having. Imagine this simple table:

[FONT=“Courier New”]-------------------------------
| name | value | date |

| test | 100 | 2010-01-01 |
| test2 | 200 | 2010-01-01 |
| test | 300 | 2010-01-05 |
| test2 | 100 | 2010-01-06 |
-------------------------------[/FONT]

I want to get the rows from the table that are most recent for each ‘name’. I.e., get unique ‘name’ but the most recent one:

| test | 300 | 2010-01-05 |
| test2 | 100 | 2010-01-06 |

How can I achieve this?

Thanks in advance!

SELECT t.name
     , t.value
     , t.date
  FROM ( SELECT name
              , MAX(date) AS latest
           FROM this_simple_table
         GROUP
             BY name ) AS m
INNER
  JOIN this_simple_table AS t
    ON t.name = m.name
   AND t.date = m.latest