I have two tables like this:
Table1 (Number column is unique)
Number | date
1234 2008-10-06 17:11:00
5678 2005-10-19 16:20:00
9023 2005-12-09 16:20:00
4243 2009-01-06 17:11:00
5234 2009-01-14 17:11:00
Table 2
Number | code
1234 A1
1234 B1
5678 A1
9023 A1
4243 C1
5234 C1
I am trying to retrieve data from these two tables so that I get only one row for each code in Table 2 that is the most recent (from table 1).
Based on this example, my result would be:
1234 A1 (because thats the one with latest date)
1234 B1 (because thats the one with latest date)
5234 C1 (because thats the one with latest date)